2
0
mirror of https://github.com/offen/website.git synced 2024-10-18 12:10:25 +02:00

add conditional cache headers to nginx conf

This commit is contained in:
Frederik Ring 2019-09-12 16:35:24 +02:00
parent 9a493a09f9
commit c69bcc8075

View File

@ -11,10 +11,17 @@ http {
server server:3000;
}
map $request_uri $expires {
default off;
"~-[0-9a-z]{10}\.js$" 365d;
"~*(woff|woff2|ttf|eot)$" 365d;
}
server {
listen 80;
autoindex on;
root /www/data;
expires $expires;
location /api/ {
proxy_pass http://server;