mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] runbot: use proxy-mode for running instances
When deployed behind nginx reverse proxy and https, the Odoo proxy-mode must be enabled.
This commit is contained in:
parent
ed8d194d7e
commit
59d4eeaf24
@ -311,6 +311,9 @@ class ConfigStep(models.Model):
|
||||
# we need to have at least one job of type install_odoo to run odoo, take the last one for db_name.
|
||||
cmd += ['-d', '%s-%s' % (build.dest, db_name)]
|
||||
|
||||
if grep(build._server("tools/config.py"), "proxy-mode") and build.repo_id.nginx:
|
||||
cmd += ["--proxy-mode"]
|
||||
|
||||
if grep(build._server("tools/config.py"), "db-filter"):
|
||||
if build.repo_id.nginx:
|
||||
cmd += ['--db-filter', '%d.*$']
|
||||
|
@ -25,10 +25,16 @@ autoindex on;
|
||||
gzip on;
|
||||
gzip_types text/css text/plain application/xml application/json application/javascript;
|
||||
|
||||
map $http_x_forwarded_proto $real_scheme {
|
||||
default $http_x_forwarded_proto;
|
||||
'' $scheme;
|
||||
}
|
||||
|
||||
proxy_temp_path <t t-esc="nginx_dir"/>;
|
||||
proxy_read_timeout 600;
|
||||
proxy_connect_timeout 600;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Proto $real_scheme;
|
||||
proxy_set_header Host $host;
|
||||
|
||||
server {
|
||||
|
Loading…
Reference in New Issue
Block a user