mirror of
https://github.com/YunoHost-Apps/akkoma_ynh.git
synced 2024-09-03 20:36:17 +02:00
Update nginx.conf (#40)
* Update nginx.conf Fix bug in which media was being scrubbed out by CSP * Use __PORT__ instead of fixed value --------- Co-authored-by: lapineige <lapineige@users.noreply.github.com>
This commit is contained in:
parent
bd8c1ae9ef
commit
c5d1b8a95d
1 changed files with 15 additions and 2 deletions
|
@ -36,6 +36,19 @@ location / {
|
||||||
include conf.d/yunohost_panel.conf.inc;
|
include conf.d/yunohost_panel.conf.inc;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ ^/(proxy|media) {
|
rewrite ^/proxy/(.*)/(.*)/.* /proxy/$1/$2 last;
|
||||||
more_set_headers "Content-Security-Policy : default-src 'none'; upgrade-insecure-requests; sandbox;";
|
|
||||||
|
location ~ ^/(media|proxy) {
|
||||||
|
proxy_cache akkoma_media_cache;
|
||||||
|
proxy_cache_key $host$uri$is_args$args;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_cache_valid 200 206 301 304 1h;
|
||||||
|
proxy_cache_lock on;
|
||||||
|
proxy_ignore_client_abort on;
|
||||||
|
proxy_buffering on;
|
||||||
|
chunked_transfer_encoding on;
|
||||||
|
# added some stuff that seirdy said to add to make me bullet proof. B-) https://akkoma.dev/AkkomaGang/akkoma/issues/547#issuecomment-9261
|
||||||
|
more_set_headers "Content-Security-Policy : script-src 'none'; default-src 'none'; upgrade-insecure-requests; base-uri 'none'; form-action 'none'; 'sandbox';";
|
||||||
|
|
||||||
|
proxy_pass http://localhost:__PORT__;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue