feat: rbac迁移完成,并已部署至dev服务器
This commit is contained in:
@@ -42,6 +42,8 @@ func (m *CorsMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc {
|
||||
w.Header().Set("Access-Control-Allow-Headers", strings.Join(m.allowHeaders, ", "))
|
||||
w.Header().Set("Access-Control-Allow-Credentials", "true")
|
||||
w.Header().Set("Access-Control-Max-Age", "3600")
|
||||
// 允许前端 JS 读取自定义响应头(用于 Token 自动续期)
|
||||
w.Header().Set("Access-Control-Expose-Headers", "X-Refresh-Token")
|
||||
}
|
||||
|
||||
// 预检请求直接返回
|
||||
|
||||
Reference in New Issue
Block a user