We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent70b113d commita7646d1Copy full SHA for a7646d1
coderd/coderd.go
@@ -464,8 +464,16 @@ func New(options *Options) *API {
464
r:=chi.NewRouter()
465
// We add this middleware early, to make sure that authorization checks made
466
// by other middleware get recorded.
467
+//nolint:revive,staticcheck // This block will be re-enabled, not going to remove it
468
ifbuildinfo.IsDev() {
-r.Use(httpmw.RecordAuthzChecks)
469
+// TODO: Find another solution to opt into these checks.
470
+// If the header grows too large, it breaks `fetch()` requests.
471
+// Temporarily disabling this until we can find a better solution.
472
+// One idea is to include checking the request for `X-Authz-Record=true`
473
+// header. To opt in on a per-request basis.
474
+// Some authz calls (like filtering lists) might be able to be
475
+// summarized better to condense the header payload.
476
+// r.Use(httpmw.RecordAuthzChecks)
477
}
478
479
ctx,cancel:=context.WithCancel(context.Background())