Skip to content

Commit

Permalink
feat: nginx readme
Browse files Browse the repository at this point in the history
  • Loading branch information
janikvonrotz committed Feb 6, 2025
1 parent 9bfb9d3 commit 2da0f78
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions roles/nginx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ nginx_proxies:
include /etc/nginx/conf.d/proxies/odoo-exporter.nginx;
client_max_body_size 32M;
if ($request_method = OPTIONS) {
add_header Access-Control-Allow-Origin "http://localhost:8080";
add_header Access-Control-Allow-Origin "$http_origin";
add_header Access-Control-Allow-Credentials true;
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS";
add_header Access-Control-Allow-Headers "Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With";
Expand All @@ -111,9 +111,10 @@ nginx_proxies:
add_header Content-Length 0;
return 204;
}
add_header Access-Control-Allow-Origin "http://localhost:8080";
add_header Access-Control-Allow-Credentials true;
proxy_cookie_path / "/; secure; HttpOnly; SameSite=None";
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With,X-API-Key';
locations:
- path: /websocket
dest_hostname: odoochat
Expand Down

0 comments on commit 2da0f78

Please sign in to comment.