feat: add Access-Control-Expose-Headers to headers (#2467)

Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
Gaius 2023-06-15 22:49:51 +08:00
parent 5342fb97fc
commit b2cb2ed024
No known key found for this signature in database
GPG Key ID: 8B4E5D1290FA2FFB
1 changed files with 1 additions and 0 deletions

View File

@ -34,6 +34,7 @@ func CORS() gin.HandlerFunc {
c.Header(headers.AccessControlAllowOrigin, origin) c.Header(headers.AccessControlAllowOrigin, origin)
c.Header(headers.AccessControlAllowCredentials, "true") c.Header(headers.AccessControlAllowCredentials, "true")
c.Header(headers.AccessControlExposeHeaders, strings.Join([]string{headers.Link, headers.Location, headers.Authorization}, ","))
if c.Request.Method != http.MethodOptions { if c.Request.Method != http.MethodOptions {
c.Next() c.Next()