Skip to content

Commit 6076b4c

Browse files
author
xiushengx
authored
cors.go fix 修复角色切换bug (#1033)
修复角色切换bug
1 parent b158849 commit 6076b4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/middleware/cors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func Cors() gin.HandlerFunc {
1515
c.Header("Access-Control-Allow-Origin", origin)
1616
c.Header("Access-Control-Allow-Headers", "Content-Type,AccessToken,X-CSRF-Token, Authorization, Token,X-Token,X-User-Id")
1717
c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS,DELETE,PUT")
18-
c.Header("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type")
18+
c.Header("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type, New-Token, New-Expires-At")
1919
c.Header("Access-Control-Allow-Credentials", "true")
2020

2121
// 放行所有OPTIONS方法

0 commit comments

Comments
 (0)