mirror of
https://github.com/odoocker/odoocker
synced 2025-11-04 15:19:22 +01:00
first commit
This commit is contained in:
57
nginx/default.conf
Normal file
57
nginx/default.conf
Normal file
@@ -0,0 +1,57 @@
|
||||
# Allows the usage of $CORS_ALLOWED_DOMAIN
|
||||
map $http_x_cors_allowed_domain $CORS_ALLOWED_DOMAIN {
|
||||
default "*";
|
||||
}
|
||||
|
||||
server {
|
||||
client_max_body_size 1024m;
|
||||
|
||||
proxy_connect_timeout 900;
|
||||
proxy_send_timeout 900;
|
||||
proxy_read_timeout 900;
|
||||
send_timeout 900;
|
||||
|
||||
listen [::]:80;
|
||||
listen 80;
|
||||
|
||||
server_name $VIRTUAL_HOST;
|
||||
|
||||
location ~ /.well-known/acme-challenge {
|
||||
allow all;
|
||||
root /var/www/html;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Host $host;
|
||||
proxy_pass http://odoo:8069;
|
||||
|
||||
# Add CORS headers
|
||||
add_header 'Access-Control-Allow-Origin' $CORS_ALLOWED_DOMAIN;
|
||||
add_header 'Access-Control-Allow-Credentials' 'true';
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
|
||||
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
|
||||
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
|
||||
if ($request_method = 'OPTIONS') {
|
||||
return 204;
|
||||
}
|
||||
}
|
||||
|
||||
location ~* /web/static/ {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Host $host;
|
||||
proxy_pass http://odoo:8069;
|
||||
}
|
||||
|
||||
location /longpolling {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Host $host;
|
||||
proxy_pass http://odoo:8072;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user