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

pull/7785/head
E99p1ant 2020-10-10 23:09:42 +08:00 committed by Joe Chen
parent 26395294bd
commit 8a046c22a8
No known key found for this signature in database
GPG Key ID: 0BDE5280C552FF60
1 changed files with 1 additions and 1 deletions

View File

@ -249,7 +249,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")
}