my server receives nothing, checking under the network tab, there is an empty authorization header… Is there anything I am doing wrong? I have tried this "Authorization":Bearer ${store.state.token} too but failed.
token is not empty, I can see it in console.log(). I have tried the beforeSend too and failed…
My Apache backend is ‘stupid’ , it strips off Authorization headers…
I can’t spend 3 hours figuring this out… I have decided to send the token as part of the data… So solved!
Awesome… Tried this but still failed… I tried a custom header like:
headers: {
'Token' : store.state.token
}
and added header("Access-Control-Allow-Headers: Authorization, Token, Content-Type");
for CORS and it worked… But Authorization doesnot work whatsoever… I use JWT Auth, so basically, I validate all requests before releasing no data… I guess this will work
Yes… Pretty confusing… Even restarted apache but failed. But it’s ok, we are planning to dump PHP for node, but now, this will work. @pvtallulah… Thanks so much and congs upon becoming a patron bro, coming soon!