Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

MizanRifat's avatar

Sanctum spa authentication Header

In the Laravel 10 Sanctum SPA authentication documentation, the recommendation is to 'Additionally, ensure that you send the Accept: application/json header and include either the Referer or Origin header with your request.'

However, when I attempt to send the 'Origin' header with my Axios request, I receive the error: 'Refused to set unsafe header "Origin".'"

i'm using nextjs for my frontend. Does anyone has any idea how to solve this?

0 likes
1 reply

Please or to participate in this conversation.