Upgrade Cinny (v3.2.0 -> v4.0.0) and adapt our custom nginx configuration with the new URL rewrites
Cinny includes nginx configuration which does URL rewrites now, as seen here: https://raw.githubusercontent.com/cinnyapp/cinny/dev/docker-nginx.conf That said, we have our own nginx configuration for Cinny, because we'd like to run ngin as non-root and on a non-privileged port (80 -> 8080). For this reason, we override `/etc/nginx/nginx.conf` and need to duplicate what we see in `/etc/nginx/conf.d/default.conf` with our own `server` block (which listens on port 8080).
This commit is contained in:
@ -51,16 +51,20 @@ http {
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
location / {
|
||||
index index.html index.htm;
|
||||
}
|
||||
# Inspired by: https://raw.githubusercontent.com/cinnyapp/cinny/dev/docker-nginx.conf
|
||||
|
||||
location ~* ^/(config(.+)?\.json$|(.+)\.html$|i18n) {
|
||||
expires -1;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
rewrite ^/config.json$ /config.json break;
|
||||
rewrite ^/manifest.json$ /manifest.json break;
|
||||
|
||||
rewrite ^.*/olm.wasm$ /olm.wasm break;
|
||||
rewrite ^/pdf.worker.min.js$ /pdf.worker.min.js break;
|
||||
|
||||
rewrite ^/public/(.*)$ /public/$1 break;
|
||||
rewrite ^/assets/(.*)$ /assets/$1 break;
|
||||
|
||||
rewrite ^(.+)$ /index.html break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user