mirror of
				https://github.com/songquanpeng/one-api.git
				synced 2025-11-04 15:53:42 +08:00 
			
		
		
		
	chore: add x-requested-with header in CORS setting
This commit is contained in:
		@@ -10,6 +10,6 @@ func CORS() gin.HandlerFunc {
 | 
			
		||||
	config.AllowAllOrigins = true
 | 
			
		||||
	config.AllowCredentials = true
 | 
			
		||||
	config.AllowMethods = []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"}
 | 
			
		||||
	config.AllowHeaders = []string{"Origin", "Content-Length", "Content-Type", "Authorization", "Accept", "Connection"}
 | 
			
		||||
	config.AllowHeaders = []string{"Origin", "Content-Length", "Content-Type", "Authorization", "Accept", "Connection", "x-requested-with"}
 | 
			
		||||
	return cors.New(config)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user