Skip to content

Commit 1322f99

Browse files
committed
Use correct MW
1 parent dbbd2ba commit 1322f99

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

enterprise/coderd/coderd.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,15 @@ func New(ctx context.Context, options *Options) (*API, error) {
8383
})
8484
r.Route("/workspaceproxies", func(r chi.Router) {
8585
r.Use(
86-
apiKeyMiddleware,
8786
api.moonsEnabledMW,
8887
)
89-
r.Post("/", api.postWorkspaceProxy)
90-
r.Get("/", api.workspaceProxies)
88+
r.Route("/", func(r chi.Router) {
89+
r.Use(
90+
apiKeyMiddleware,
91+
)
92+
r.Post("/", api.postWorkspaceProxy)
93+
r.Get("/", api.workspaceProxies)
94+
})
9195
r.Route("/me", func(r chi.Router) {
9296
r.Use(
9397
httpmw.ExtractWorkspaceProxy(httpmw.ExtractWorkspaceProxyConfig{

0 commit comments

Comments
 (0)