Skip to content

Commit

Permalink
Merge pull request #73 from siemens/contentDisposition
Browse files Browse the repository at this point in the history
fix(content_disposition): Expose header content-disposition to the browser

Reviewed-by: mishra.gaurav@siemens.com
  • Loading branch information
GMishx authored Jul 1, 2024
2 parents f6f5616 + 58ca6bb commit b486528
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/middleware/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ func CORSMiddleware() gin.HandlerFunc {
c.Writer.Header().Set("Access-Control-Allow-Origin", "*")
c.Writer.Header().Set("Access-Control-Allow-Credentials", "true")
c.Writer.Header().Set("Access-Control-Allow-Headers", "Content-Type, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, accept, origin, Cache-Control, X-Requested-With")
c.Writer.Header().Set("Access-Control-Expose-Headers", "Content-Disposition")
c.Writer.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS, GET, PUT, PATCH, DELETE")

if c.Request.Method == "OPTIONS" {
Expand Down

0 comments on commit b486528

Please sign in to comment.