@@ -63,7 +63,7 @@ func TestCSRFExemptList(t *testing.T) {
63
63
r ,err := http .NewRequestWithContext (context .Background (),http .MethodPost ,c .URL ,nil )
64
64
require .NoError (t ,err )
65
65
66
- r .AddCookie (& http.Cookie {Name :codersdk .SessionTokenCookie ,Value :"test" })
66
+ r .AddCookie (& http.Cookie {Name :codersdk .GetSessionTokenCookie () ,Value :"test" })
67
67
exempt := csrfmw .IsExempt (r )
68
68
require .Equal (t ,c .Exempt ,exempt )
69
69
})
@@ -96,7 +96,7 @@ func TestCSRFError(t *testing.T) {
96
96
req ,err := http .NewRequestWithContext (context .Background (),http .MethodPost ,urlPath ,nil )
97
97
require .NoError (t ,err )
98
98
99
- req .AddCookie (& http.Cookie {Name :codersdk .SessionTokenCookie ,Value :"session_token_value" })
99
+ req .AddCookie (& http.Cookie {Name :codersdk .GetSessionTokenCookie () ,Value :"session_token_value" })
100
100
req .AddCookie (& http.Cookie {Name :nosurf .CookieName ,Value :csrfCookieValue })
101
101
req .Header .Add (nosurf .HeaderName ,csrfHeaderValue )
102
102
@@ -113,7 +113,7 @@ func TestCSRFError(t *testing.T) {
113
113
req ,err := http .NewRequestWithContext (context .Background (),http .MethodPost ,urlPath ,nil )
114
114
require .NoError (t ,err )
115
115
116
- req .AddCookie (& http.Cookie {Name :codersdk .SessionTokenCookie ,Value :"session_token_value" })
116
+ req .AddCookie (& http.Cookie {Name :codersdk .GetSessionTokenCookie () ,Value :"session_token_value" })
117
117
req .AddCookie (& http.Cookie {Name :nosurf .CookieName ,Value :csrfCookieValue })
118
118
119
119
rec := httptest .NewRecorder ()
@@ -132,7 +132,7 @@ func TestCSRFError(t *testing.T) {
132
132
req ,err := http .NewRequestWithContext (context .Background (),http .MethodPost ,urlPath ,nil )
133
133
require .NoError (t ,err )
134
134
135
- req .AddCookie (& http.Cookie {Name :codersdk .SessionTokenCookie ,Value :"session_token_value" })
135
+ req .AddCookie (& http.Cookie {Name :codersdk .GetSessionTokenCookie () ,Value :"session_token_value" })
136
136
req .AddCookie (& http.Cookie {Name :nosurf .CookieName ,Value :csrfCookieValue })
137
137
req .Header .Add (codersdk .SessionTokenHeader ,"mismatched_value" )
138
138