diff --git a/conf/nginx.conf b/conf/nginx.conf index ac25ddf..8120fe3 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -36,6 +36,22 @@ location / { include conf.d/yunohost_panel.conf.inc; } +rewrite ^/proxy/(.*)/(.*)/.* /proxy/$1/$2 last; + +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__; +======= location ~ ^/(proxy|media) { more_set_headers "Content-Security-Policy : default-src 'none'; upgrade-insecure-requests; sandbox;"; }