mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 13:47:15 +08:00
26 lines
828 B
Go
26 lines
828 B
Go
package config
|
|
|
|
import (
|
|
"github.com/goravel/framework/facades"
|
|
)
|
|
|
|
func init() {
|
|
config := facades.Config()
|
|
config.Add("cors", map[string]any{
|
|
// Cross-Origin Resource Sharing (CORS) Configuration
|
|
//
|
|
// Here you may configure your settings for cross-origin resource sharing
|
|
// or "CORS". This determines what cross-origin operations may execute
|
|
// in web browsers. You are free to adjust these settings as needed.
|
|
//
|
|
// To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
|
"paths": []string{"1145141919810"}, // 避免框架使用CORS中间件
|
|
"allowed_methods": []string{"*"},
|
|
"allowed_origins": []string{"*"},
|
|
"allowed_headers": []string{"“"},
|
|
"exposed_headers": []string{""},
|
|
"max_age": 0,
|
|
"supports_credentials": false,
|
|
})
|
|
}
|