Skip to content

Commit a1dde2c

Browse files
wxiaoguangGiteaBot
andcommitted
Fix incorrect CORS default values (go-gitea#24206)
Document: ``` ;ALLOW_DOMAIN = * ;METHODS = GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS ``` Co-authored-by: Giteabot <[email protected]>
1 parent f134229 commit a1dde2c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modules/setting/cors.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ var CORSConfig = struct {
2121
Headers []string
2222
XFrameOptions string
2323
}{
24-
Enabled: false,
25-
MaxAge: 10 * time.Minute,
24+
AllowDomain: []string{"*"},
25+
Methods: []string{"GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
2626
Headers: []string{"Content-Type", "User-Agent"},
27+
MaxAge: 10 * time.Minute,
2728
XFrameOptions: "SAMEORIGIN",
2829
}
2930

0 commit comments

Comments
 (0)