Browse Source

添加一些允许跨域的头字段

master
刘子旺 7 months ago
parent
commit
f7d28ba115
  1. 2
      godo/cmd/serve.go

2
godo/cmd/serve.go

@ -86,7 +86,7 @@ func (l loggingMiddleware) Middleware(next http.Handler) http.Handler {
// CORS 中间件 // CORS 中间件
func corsMiddleware() mux.MiddlewareFunc { func corsMiddleware() mux.MiddlewareFunc {
allowHeaders := "Content-Type, Accept, Authorization, Origin" allowHeaders := "Content-Type, Accept, Authorization, Origin,filePwd,salt"
allowMethods := "GET, POST, PUT, DELETE, OPTIONS" allowMethods := "GET, POST, PUT, DELETE, OPTIONS"
return func(next http.Handler) http.Handler { return func(next http.Handler) http.Handler {

Loading…
Cancel
Save