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

mattbob's avatar

Laravel modifying axios post request headers

I'm using axios to make post requests from within a Vue component in Laravel. I can see that Laravel has added some additional headers to my post request (x-socker-id and x-csrf-token) and it also seems to be modifying the headers I'm passing in my request.

For example, I'm passing an 'X-Api-Key' header but it gets sent as all lowercase ('x-api-key').

Can I turn off the additional headers that Laravel is adding and any other post request header modifications?

0 likes
0 replies

Please or to participate in this conversation.