Skip to content

Commit 420684f

Browse files
committed
feat: enable csrf token header
1 parent d2d7628 commit 420684f

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

coderd/httpmw/csrf.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ func CSRF(secureCookie bool) func(next http.Handler) http.Handler {
3232
mw.ExemptRegexp(regexp.MustCompile("derp/*"))
3333

3434
mw.ExemptFunc(func(r *http.Request) bool {
35-
// Enable CSRF in November 2022 by deleting this "return true" line.
36-
// CSRF is not enforced to ensure backwards compatibility with older
37-
// cli versions.
38-
//nolint:revive
39-
return true
40-
4135
// CSRF only affects requests that automatically attach credentials via a cookie.
4236
// If no cookie is present, then there is no risk of CSRF.
4337
//nolint:govet

0 commit comments

Comments
 (0)