Skip to content

Commit

Permalink
Update middleware.go
Browse files Browse the repository at this point in the history
  • Loading branch information
gencebay authored Mar 17, 2020
1 parent f8daed4 commit d410108
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const httpLiveFileProviderEnvKey = "HttpLiveFileProvider"
// CORSMiddleware ...
func CORSMiddleware() gin.HandlerFunc {
return func(c *gin.Context) {
c.Writer.Header().Set("Access-Control-Allow-Origin", "http://localhost")
c.Writer.Header().Set("Access-Control-Allow-Origin", "*")
c.Writer.Header().Set("Access-Control-Max-Age", "86400")
c.Writer.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, UPDATE")
c.Writer.Header().Set("Access-Control-Allow-Headers", "X-Requested-With, Content-Type, Origin, Authorization, Accept, Client-Security-Token, Accept-Encoding, x-access-token")
Expand Down

0 comments on commit d410108

Please sign in to comment.