JSON跨域响应头
This commit is contained in:
@@ -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