mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] runbot: fix nginx static
This commit is contained in:
parent
a6fa7b8023
commit
f654738b04
@ -144,6 +144,8 @@ class Runbot(models.AbstractModel):
|
||||
env = self.env
|
||||
settings = {}
|
||||
settings['port'] = config.get('http_port')
|
||||
settings['runbot_static'] = os.path.join(get_module_resource('runbot', 'static'), '')
|
||||
settings['base_url'] = self.get_base_url()
|
||||
nginx_dir = os.path.join(self._root(), 'nginx')
|
||||
settings['nginx_dir'] = nginx_dir
|
||||
settings['re_escape'] = re.escape
|
||||
|
@ -37,6 +37,18 @@ proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Proto $real_scheme;
|
||||
proxy_set_header Host $host;
|
||||
|
||||
server {
|
||||
listen 8080 default;
|
||||
location /runbot/static/ {
|
||||
alias <t t-esc="runbot_static"/>;
|
||||
autoindex off;
|
||||
location ~ /runbot/static/build/[^/]+/(logs|tests)/ {
|
||||
autoindex on;
|
||||
add_header 'Access-Control-Allow-Origin' '<t t-esc="base_url"/>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<t t-foreach="builds" t-as="build">
|
||||
server {
|
||||
listen 8080;
|
||||
|
Loading…
Reference in New Issue
Block a user