Serve static files from nginx

This commit is contained in:
Alex Gleason 2023-10-11 21:31:53 -05:00
parent fe99e4a053
commit 3da30b4f6e
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 14 additions and 0 deletions

View File

@ -44,6 +44,20 @@ server {
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
location /packs {
add_header Cache-Control "public, max-age=31536000, immutable";
add_header Strict-Transport-Security "max-age=31536000" always;
root /opt/ditto/public;
}
location ~ ^/(instance|sw.js$|sw.js.map$) {
root /opt/ditto/public;
}
location /images {
root /opt/ditto/static;
}
location / { location / {
proxy_pass http://ditto; proxy_pass http://ditto;
} }