Created
September 3, 2021 15:33
-
-
Save almet/b3bbfc7aae24822d88a6e02fcb88cdb9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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