Archived
1
0

update configs

This commit is contained in:
Jeff Becker 2018-03-09 08:50:01 -05:00
parent 4bef3d8964
commit 55ba1e6c7c
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
2 changed files with 11 additions and 7 deletions

View File

@ -71,7 +71,7 @@ server {
alias $nntpchan/webroot/img/$1.$2; alias $nntpchan/webroot/img/$1.$2;
} }
location ~ /thm/(.+)\.jpg$ { location ~ /thm/(.+)$ {
# http subdomain rewrite for sfw # http subdomain rewrite for sfw
if ( $http_host ~ fbi ) { if ( $http_host ~ fbi ) {
rewrite ^/(.+).jpg /static/placeholder.jpg break; rewrite ^/(.+).jpg /static/placeholder.jpg break;
@ -79,7 +79,7 @@ server {
if ( $http_host ~ sfw ) { if ( $http_host ~ sfw ) {
rewrite ^/(.+).jpg /static/placeholder.jpg break; rewrite ^/(.+).jpg /static/placeholder.jpg break;
} }
alias $nntpchan/webroot/thm/; alias $nntpchan/webroot/thm/$1;
} }
} }

View File

@ -41,10 +41,6 @@ sub vcl_recv {
if (req.url ~ "\#") { if (req.url ~ "\#") {
set req.url = regsub(req.url, "\#.*$", ""); set req.url = regsub(req.url, "\#.*$", "");
} }
# Strip a trailing ? if it exists
if (req.url ~ "\?$") {
set req.url = regsub(req.url, "\?$", "");
}
return (hash); return (hash);
} }
@ -66,7 +62,15 @@ sub vcl_backend_response {
if (beresp.status == 500 || beresp.status == 502 || beresp.status == 503 || beresp.status == 504) { if (beresp.status == 500 || beresp.status == 502 || beresp.status == 503 || beresp.status == 504) {
return (abandon); return (abandon);
} }
set beresp.ttl = 10s; if (bereq.url == "/boards.html" ) {
set beresp.ttl = 60s;
}
if (bereq.url == "/index.html" ) {
set beresp.ttl = 60s;
}
if (bereq.url == "/" ) {
set beresp.ttl = 60s;
}
set beresp.grace = 1h; set beresp.grace = 1h;
return (deliver); return (deliver);
} }