mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[FIX] runbot: escape server name in nginx config
This commit is contained in:
parent
3339d20520
commit
f22ca0d212
@ -418,6 +418,7 @@ class runbot_repo(osv.osv):
|
||||
settings['runbot_static'] = os.path.join(get_module_resource('runbot', 'static'), '')
|
||||
nginx_dir = os.path.join(self._root(cr, uid), 'nginx')
|
||||
settings['nginx_dir'] = nginx_dir
|
||||
settings['re_escape'] = re.escape
|
||||
ids = self.search(cr, uid, [('nginx','=',True)], order='id')
|
||||
if ids:
|
||||
build_ids = self.pool['runbot.build'].search(cr, uid, [('repo_id','in',ids), ('state','=','running')])
|
||||
|
@ -704,7 +704,7 @@ http {
|
||||
<t t-foreach="builds" t-as="build">
|
||||
server {
|
||||
listen 8080;
|
||||
server_name ~^<t t-esc="build.dest"/>[-.].*$;
|
||||
server_name ~^<t t-raw="re_escpace(build.dest)"/>[-.].*$;
|
||||
location / { proxy_pass http://127.0.0.1:<t t-esc="build.port"/>; }
|
||||
location /longpolling { proxy_pass http://127.0.0.1:<t t-esc="build.port + 1"/>; }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user