context: fix Access-Control-Allow-Credentials header typo (#6381)

pull/6386/head
E99p1ant 2020-10-10 23:09:42 +08:00 committed by GitHub
parent 533b6b0de2
commit fd765bd88f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -248,7 +248,7 @@ func Contexter() macaron.Handler {
if len(conf.HTTP.AccessControlAllowOrigin) > 0 {
c.Header().Set("Access-Control-Allow-Origin", conf.HTTP.AccessControlAllowOrigin)
c.Header().Set("'Access-Control-Allow-Credentials' ", "true")
c.Header().Set("Access-Control-Allow-Credentials", "true")
c.Header().Set("Access-Control-Max-Age", "3600")
c.Header().Set("Access-Control-Allow-Headers", "Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With")
}