mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Fix incorrect CORS default values (#24206)
Document: ``` ;ALLOW_DOMAIN = * ;METHODS = GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS ``` Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
		@@ -21,9 +21,10 @@ var CORSConfig = struct {
 | 
				
			|||||||
	Headers          []string
 | 
						Headers          []string
 | 
				
			||||||
	XFrameOptions    string
 | 
						XFrameOptions    string
 | 
				
			||||||
}{
 | 
					}{
 | 
				
			||||||
	Enabled:       false,
 | 
						AllowDomain:   []string{"*"},
 | 
				
			||||||
	MaxAge:        10 * time.Minute,
 | 
						Methods:       []string{"GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
 | 
				
			||||||
	Headers:       []string{"Content-Type", "User-Agent"},
 | 
						Headers:       []string{"Content-Type", "User-Agent"},
 | 
				
			||||||
 | 
						MaxAge:        10 * time.Minute,
 | 
				
			||||||
	XFrameOptions: "SAMEORIGIN",
 | 
						XFrameOptions: "SAMEORIGIN",
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user