mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
Merge branch 'nginx-static' into 'main'
Serve static files from nginx See merge request soapbox-pub/ditto!55
This commit is contained in:
commit
7ec028465e
1 changed files with 14 additions and 0 deletions
|
|
@ -44,6 +44,20 @@ server {
|
|||
proxy_set_header Host $http_host;
|
||||
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 / {
|
||||
proxy_pass http://ditto;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue