1
0
Fork 0
forked from forgejo/forgejo

Merge branch 'rebase-v1.21/forgejo-branding' into wip-v1.21-forgejo

This commit is contained in:
Earl Warren 2023-11-13 16:47:18 +01:00
commit 8869464c1d
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
125 changed files with 1181 additions and 298 deletions

View file

@ -56,7 +56,7 @@
// description: Sudo API request as the user provided as the key. Admin privileges are required.
// TOTPHeader:
// type: apiKey
// name: X-GITEA-OTP
// name: X-FORGEJO-OTP
// in: header
// description: Must be used in combination with BasicAuth if two-factor authentication is enabled.
//
@ -799,7 +799,7 @@ func Routes() *web.Route {
// setting.CORSConfig.AllowSubdomain // FIXME: the cors middleware needs allowSubdomain option
AllowedMethods: setting.CORSConfig.Methods,
AllowCredentials: setting.CORSConfig.AllowCredentials,
AllowedHeaders: append([]string{"Authorization", "X-Gitea-OTP"}, setting.CORSConfig.Headers...),
AllowedHeaders: append([]string{"Authorization", "X-Gitea-OTP", "X-Forgejo-OTP"}, setting.CORSConfig.Headers...),
MaxAge: int(setting.CORSConfig.MaxAge.Seconds()),
}))
}