JSON跨域响应头
This commit is contained in:
1 parent
1bccead591
commit
6701d66951
2 files changed
+11
-5
No files matched your search
@@ -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 == "" {
|
||||
|
||||
Reference in new issue
Block a user