I have an API endpoint that I call from my React app. That API is on the same domain. Something like:
https://www.example.com
https://www.example.com/api/update-something
I use cross-fetch to do that request.
I was expecting to see an Origin header on my server logs. Infact, I was expecting to see Origin: https://www.example.com .
But here is what I get:
Origin: undefined
// AND I ALSO GET THESE HEADERS
"sec-fetch-dest":"empty",
"sec-fetch-mode":"cors",
"sec-fetch-site":"same-origin"
What do they mean? It's like the Origin check was already made?
For example: if I get sec-fetch-site: cross-site it means that the call was generate in another website/domain? Is that correct?
Reference:
Sec-Fetch-Site: cross-site
Sec-Fetch-Site: same-origin
Sec-Fetch-Site: same-site
Sec-Fetch-Site: none