Hi all as the title says I can't figure out how to set the ""Access-Control-Allow-Origin"" directive in the conf file. In fact, when I try to access from the front end, the back end fails to authenticate me and I always get this error which refers to the directive specified above:
""Http failure response for site_name_example/login: 0 Unknown Error""
My configuration is as follows:
server {
server_name site_name_example;
location / {
proxy_set_header X-Forwarded-Host $server_name;
proxy_pass http://x.x.x.x:4200;
}
location /api {
proxy_pass http://y.y.y.y:9090/example;
add_header Access-Control-Allow-Origin *;
}
}
I hope someone help me