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:
parent
9ceee13edc
commit
f4450b6a38
9 changed files with 23 additions and 10 deletions
|
@ -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
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue