We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 043c79d commit 388e56eCopy full SHA for 388e56e
coderd/httpmw/csrf.go
@@ -45,6 +45,7 @@ func CSRF(secureCookie bool) func(next http.Handler) http.Handler {
45
mw.ExemptRegexp(regexp.MustCompile("/organizations/[^/]+/provisionerdaemons/*"))
46
47
mw.ExemptFunc(func(r *http.Request) bool {
48
+ // Only enforce CSRF on API routes.
49
if !strings.HasPrefix(r.URL.Path, "/api") {
50
return true
51
}
0 commit comments