Skip to content

Commit 388e56e

Browse files
committed
add comment
1 parent 043c79d commit 388e56e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

coderd/httpmw/csrf.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ func CSRF(secureCookie bool) func(next http.Handler) http.Handler {
4545
mw.ExemptRegexp(regexp.MustCompile("/organizations/[^/]+/provisionerdaemons/*"))
4646

4747
mw.ExemptFunc(func(r *http.Request) bool {
48+
// Only enforce CSRF on API routes.
4849
if !strings.HasPrefix(r.URL.Path, "/api") {
4950
return true
5051
}

0 commit comments

Comments
 (0)