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:
parent
9a493a09f9
commit
c69bcc8075
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user