JSON跨域响应头

This commit is contained in:
TsMask
2023-08-29 19:23:03 +08:00
parent 1bccead591
commit 6701d66951
2 changed files with 11 additions and 5 deletions

View File

@@ -24,11 +24,6 @@ import (
func Authorize(options map[string][]string) func(http.Handler) http.Handler {
return func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.RequestURI == "/api/rest/securityManagement/v1/oauth/token" {
// 继续处理请求
next.ServeHTTP(w, r)
return
}
// 获取请求头标识信息
accessToken := r.Header.Get("AccessToken")
if accessToken == "" {