Skip to content

Commit

Permalink
fix: set CORS 'Access-Control-Max-Age' header to 86400 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
erezrokah committed Apr 13, 2020
1 parent 8f7280f commit 3883c24
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ func NewAPIWithVersion(ctx context.Context, globalConfig *conf.GlobalConfigurati
AllowedMethods: []string{http.MethodGet, http.MethodHead, http.MethodPost, http.MethodPut, http.MethodDelete, http.MethodPatch},
AllowedHeaders: []string{"Accept", "Authorization", "Private-Token", "Content-Type", audHeaderName},
AllowCredentials: true,
MaxAge: 86400,
})

api.handler = corsHandler.Handler(chi.ServerBaseContext(r, ctx))
Expand Down

0 comments on commit 3883c24

Please sign in to comment.