Add underscore subdomain redirect back in nginx.conf.
parent
c59801fd70
commit
0372224c28
|
@ -72,6 +72,17 @@ http {
|
|||
root /app/snipt/static/img/;
|
||||
expires max;
|
||||
}
|
||||
|
||||
location / {
|
||||
rewrite_by_lua '
|
||||
if string.find(ngx.var.host, "_") then
|
||||
local newHost, n = ngx.re.gsub(ngx.var.host, "_", "-")
|
||||
ngx.redirect(ngx.var.scheme .. "://" .. newHost .. ngx.var.uri)
|
||||
end
|
||||
';
|
||||
proxy_pass http://backend_snipt;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://backend_snipt;
|
||||
|
|
Loading…
Reference in New Issue