Answer the question
In order to leave comments, you need to log in
What is pre-backend, preback, backend script?
It is necessary to integrate CDEK with a WordPress site. At this stage of solving the problem, I just need to connect the map (I connected it from Yandex maps) and display the SDEC labels on it. And there was a problem, the SDEK API is not ready to accept requests from the browser, giving CORS errors. As tech put it. support:
Errors of the CORS type say that requests cannot be sent from the browser to us. And it is necessary to make a layer (preback, backend script) and then requests will be processed correctly from the backend. and headers are not needed.
Answer the question
In order to leave comments, you need to log in
You need to make a proxy for your site.
This is just a php file that makes a request to SDEC and returns the result to your script, because it is on your domain and on the same port, CORS does not limit it and everything works.
Here is one example
https://dzone.com/articles/building-simple-api-proxy
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question