I
I
IvanN7772019-01-15 16:26:54
JSON Web Token
IvanN777, 2019-01-15 16:26:54

I do jwt authorization on php Authorization makes 2 requests but the token is only in one?

Authorization : Bearer some token
If I understand correctly, 2 requests are sent.
When I put the header Authorization Berear in the first request which OPTIONS it is not in the second one.
Apache server, fastcgi
How then to check the token if it is in 1 request (OPTION like a request)
After the first one, I cannot write to the session, because jwt should protect against this.
$_SERVER['Authorization']
How to check it then?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis, 2019-01-15
@sidni

OPTIONS is basically a CORS request check whether it is possible to make cross-domain requests, and the second request performs a specific action

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question