feat: add Access-Control-Expose-Headers to headers (#2467)
Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
parent
5342fb97fc
commit
b2cb2ed024
|
|
@ -34,6 +34,7 @@ func CORS() gin.HandlerFunc {
|
|||
|
||||
c.Header(headers.AccessControlAllowOrigin, origin)
|
||||
c.Header(headers.AccessControlAllowCredentials, "true")
|
||||
c.Header(headers.AccessControlExposeHeaders, strings.Join([]string{headers.Link, headers.Location, headers.Authorization}, ","))
|
||||
|
||||
if c.Request.Method != http.MethodOptions {
|
||||
c.Next()
|
||||
|
|
|
|||
Loading…
Reference in New Issue