2
0
mirror of https://github.com/offen/website.git synced 2024-11-22 17:10:29 +01: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; server server:3000;
} }
map $request_uri $expires {
default off;
"~-[0-9a-z]{10}\.js$" 365d;
"~*(woff|woff2|ttf|eot)$" 365d;
}
server { server {
listen 80; listen 80;
autoindex on; autoindex on;
root /www/data; root /www/data;
expires $expires;
location /api/ { location /api/ {
proxy_pass http://server; proxy_pass http://server;