remove use of rawInfoPage redirect

This commit is contained in:
crapStone 2023-11-16 18:24:25 +01:00
parent cbb2ce6d07
commit e32d705917
No known key found for this signature in database
GPG key ID: D74B82E7CDD863FE
5 changed files with 8 additions and 15 deletions

View file

@ -72,13 +72,6 @@ var (
EnvVars: []string{"RAW_DOMAIN"},
Value: "raw.codeberg.page",
},
// RawInfoPage will be shown (with a redirect) when trying to access RawDomain directly (or without owner/repo/path).
&cli.StringFlag{
Name: "raw-info-page",
Usage: "will be shown (with a redirect) when trying to access $RAW_DOMAIN directly (or without owner/repo/path)",
EnvVars: []string{"RAW_INFO_PAGE"},
Value: "https://docs.codeberg.org/codeberg-pages/raw-content/",
},
// #########################
// ### Page Server Setup ###

View file

@ -47,7 +47,6 @@ func Serve(ctx *cli.Context) error {
rawDomain := ctx.String("raw-domain")
defaultBranches := ctx.StringSlice("pages-branch")
mainDomainSuffix := ctx.String("pages-domain")
rawInfoPage := ctx.String("raw-info-page")
listeningHost := ctx.String("host")
listeningSSLPort := ctx.Uint("port")
listeningSSLAddress := fmt.Sprintf("%s:%d", listeningHost, listeningSSLPort)
@ -137,7 +136,6 @@ func Serve(ctx *cli.Context) error {
// Create ssl handler based on settings
sslHandler := handler.Handler(mainDomainSuffix, rawDomain,
giteaClient,
rawInfoPage,
BlacklistedPaths, allowedCorsDomains,
defaultBranches,
dnsLookupCache, canonicalDomainCache, redirectsCache)