[BRANDING] add X-Forgejo-* headers

(cherry picked from commit de86c5e6ef)
This commit is contained in:
Earl Warren 2023-01-14 08:16:30 +01:00 committed by Loïc Dachary
parent b032259089
commit fd245037ea
No known key found for this signature in database
GPG key ID: 992D23B392F9E4F2
6 changed files with 25 additions and 2 deletions

View file

@ -611,7 +611,7 @@ func Routes(ctx gocontext.Context) *web.Route {
// setting.CORSConfig.AllowSubdomain // FIXME: the cors middleware needs allowSubdomain option
AllowedMethods: setting.CORSConfig.Methods,
AllowCredentials: setting.CORSConfig.AllowCredentials,
AllowedHeaders: []string{"Authorization", "X-Gitea-OTP"},
AllowedHeaders: []string{"Authorization", "X-Gitea-OTP", "X-Forgejo-OTP"},
MaxAge: int(setting.CORSConfig.MaxAge.Seconds()),
}))
}