Skip to content

Instantly share code, notes, and snippets.

@almet
Created September 3, 2021 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save almet/b3bbfc7aae24822d88a6e02fcb88cdb9 to your computer and use it in GitHub Desktop.
Save almet/b3bbfc7aae24822d88a6e02fcb88cdb9 to your computer and use it in GitHub Desktop.
server {
server_name odooproxy.vieuxsinge.com;
location / {
# Activer le proxy
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass https://brasserieduvieuxsinge.auneor-conseil.fr;
proxy_redirect off;
proxy_buffers 32 16k;
proxy_busy_buffers_size 64k;
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'User-Agent, Origin, X-Requested-With, Content-Type, Accept' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
if ($request_method = OPTIONS ) {
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'User-Agent, Origin, X-Requested-With, Content-Type, Accept' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
add_header Content-Length 0;
add_header Content-Type text/plain;
return 200;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment