Answer the question
In order to leave comments, you need to log in
Problem with CORS Angular2 golang server and nginx, what did you do wrong?
Good afternoon! I can not get my site to send requests to the go server in any way.
The browser displays
XMLHttpRequest cannot load http://site.ru/v1/login. Origin http://site.ru is not allowed by Access-Control-Allow-Origin.
Preflight response headers: map[Vary:[Origin Access-Control-Request-Method Access-Control-Request-Headers] Access-Control-Allow-Origin:[http://site.ru] Access-Control-Allow-Methods:[POST] Access-Control-Allow-Headers:[Origin, Content-Type] Access-Control-Allow-Credentials:[true]]
add_header Access-Control-Allow-Origin *;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question