1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-08-05 05:05:17 +02:00

fix: include Referer header in API requests

This commit is contained in:
Sean Morley 2025-01-17 16:58:08 -05:00
parent 9ceee13edc
commit f4450b6a38
9 changed files with 23 additions and 10 deletions

View file

@ -21,7 +21,8 @@ export const actions: Actions = {
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': csrfToken,
Cookie: `csrftoken=${csrfToken}`
Cookie: `csrftoken=${csrfToken}`,
Referer: event.url.origin // Include Referer header
},
body: JSON.stringify({
email

View file

@ -35,7 +35,8 @@ export const actions: Actions = {
headers: {
'Content-Type': 'application/json',
Cookie: `csrftoken=${csrfToken}`,
'X-CSRFToken': csrfToken
'X-CSRFToken': csrfToken,
Referer: event.url.origin // Include Referer header
},
method: 'POST',
credentials: 'include',