V
V
VoRoN19992019-01-17 20:24:18
Yii
VoRoN1999, 2019-01-17 20:24:18

How to send bearer ajax?

Good evening.

I send bearer token via postmat everything works fine. How to send this token by ajax request?

And such a question: when I send a login and password via postman, it returns a token, and via ajax, it returns an error 500. What's the matter?

All this works on yii2. Requests are sent from another domain. (Does anyone know how to disable CORS?)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Bay, 2019-01-17
@VoRoN1999

How to learn how to disable CORS, write here. Extremely curious.
CORS?
We stumble again in CORS. Check out this -
https://stackoverflow.com/questions/10093053/add-h...
Well, in essence - api.jquery.com/jquery.ajax headers section.
Ideally, try to train a backend that is under your domain to proxy to a server with CORS.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question