Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 991d285

Browse files
committed
move cors to after app handling
1 parent 9065623 commit 991d285

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

enterprise/wsproxy/wsproxy.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,11 @@ func New(ctx context.Context, opts *Options) (*Server, error) {
339339
httpmw.ExtractRealIP(s.Options.RealIPConfig),
340340
loggermw.Logger(s.Logger),
341341
prometheusMW,
342-
corsMW,
343342

344343
// HandleSubdomain is a middleware that handles all requests to the
345344
// subdomain-based workspace apps.
346345
s.AppServer.HandleSubdomain(apiRateLimiter),
346+
corsMW,
347347
// Build-Version is helpful for debugging.
348348
func(next http.Handler) http.Handler {
349349
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {

0 commit comments

Comments
 (0)