Commit 60674b98 authored by Pietro Albini's avatar Pietro Albini

Support caching in the nginx configuration file

parent 40cd49a7
......@@ -8,13 +8,19 @@ server {
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
}
location ~ ^/([a-zA-Z0-9\-\._]+)/(.*) {
location ~ ^/([a-zA-Z0-9\-\._]+)/ {
set $branch $1;
rewrite ^/([a-zA-Z0-9\-\._]+)/(.*) /$2 break;
root $managetests_root/caches;
try_files $request_uri.html $request_uri/index.html @branch;
}
location @branch {
proxy_pass http://unix:$managetests_root/socks/branches/$branch.sock;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
......@@ -23,4 +29,3 @@ server {
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment