mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Fix: cors middleware should be applied directly to root router
This commit is contained in:
@@ -56,7 +56,6 @@ type thumb struct {
|
||||
|
||||
// 跨域配置
|
||||
type cors struct {
|
||||
AllowAllOrigins bool
|
||||
AllowOrigins []string
|
||||
AllowMethods []string
|
||||
AllowHeaders []string
|
||||
|
||||
@@ -38,7 +38,6 @@ var CaptchaConfig = &captcha{
|
||||
|
||||
// CORSConfig 跨域配置
|
||||
var CORSConfig = &cors{
|
||||
AllowAllOrigins: false,
|
||||
AllowOrigins: []string{"UNSET"},
|
||||
AllowMethods: []string{"PUT", "POST", "GET", "OPTIONS"},
|
||||
AllowHeaders: []string{"Cookie", "Content-Length", "Content-Type", "X-Path", "X-FileName"},
|
||||
|
||||
Reference in New Issue
Block a user