Skip to content

fix: relax csrf to exclude path based apps #11430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jan 8, 2024
Prev Previous commit
Linting
  • Loading branch information
Emyrk committed Jan 8, 2024
commit 6966f87bb235dc921c1e8383a21238d0041110cb
3 changes: 2 additions & 1 deletion coderd/httpmw/csrf_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package httpmw_test

import (
"context"
"net/http"
"testing"

Expand Down Expand Up @@ -59,7 +60,7 @@ func TestCSRFExemptList(t *testing.T) {
t.Run(c.Name, func(t *testing.T) {
t.Parallel()

r, err := http.NewRequest(http.MethodPost, c.URL, nil)
r, err := http.NewRequestWithContext(context.Background(), http.MethodPost, c.URL, nil)
require.NoError(t, err)

r.AddCookie(&http.Cookie{Name: codersdk.SessionTokenCookie, Value: "test"})
Expand Down