This commit is contained in:
Charlotte 🦝 Delenk 2022-11-16 13:47:01 +01:00
parent d3ef154874
commit 21e41f9af4
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122

View file

@ -117,28 +117,30 @@ in {
port = 24155;
}
];
extraConfig = ''
limit_except GET {
deny all;
}
proxy_set_header Authorization ${"''"};
proxy_hide_header Set-Cookie;
proxy_hide_header 'Access-Control-Allow-Origin';
proxy_hide_header 'Access-Control-Allow-Methods';
proxy_hide_header 'Access-Control-Allow-Headers';
proxy_ignore_headers Set-Cookie;
proxy_intercept_errors off;
proxy_cache akkoma_media_cache;
proxy_cache_key $host$uri$is_args$args;
proxy_cache_valid 200 48h;
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
proxy_cache_lock on;
expires 1y;
add_header Cache-Control public;
add_header 'Access-Control-Allow-Origin' '*';
add_header X-Cache-Status $upstream_cache_status;
'';
proxyPass = "https://f000.backblazeb2.com/file/mastodon-chir-rs/";
locations."/" = {
extraConfig = ''
limit_except GET {
deny all;
}
proxy_set_header Authorization ${"''"};
proxy_hide_header Set-Cookie;
proxy_hide_header 'Access-Control-Allow-Origin';
proxy_hide_header 'Access-Control-Allow-Methods';
proxy_hide_header 'Access-Control-Allow-Headers';
proxy_ignore_headers Set-Cookie;
proxy_intercept_errors off;
proxy_cache akkoma_media_cache;
proxy_cache_key $host$uri$is_args$args;
proxy_cache_valid 200 48h;
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
proxy_cache_lock on;
expires 1y;
add_header Cache-Control public;
add_header 'Access-Control-Allow-Origin' '*';
add_header X-Cache-Status $upstream_cache_status;
'';
proxyPass = "https://f000.backblazeb2.com/file/mastodon-chir-rs/";
};
};
services.nginx.virtualHosts."cache.chir.rs" = {
listen = [
@ -147,27 +149,29 @@ in {
port = 24155;
}
];
extraConfig = ''
limit_except GET {
deny all;
}
proxy_set_header Authorization ${"''"};
proxy_hide_header Set-Cookie;
proxy_hide_header 'Access-Control-Allow-Origin';
proxy_hide_header 'Access-Control-Allow-Methods';
proxy_hide_header 'Access-Control-Allow-Headers';
proxy_ignore_headers Set-Cookie;
proxy_intercept_errors off;
proxy_cache akkoma_media_cache;
proxy_cache_key $host$uri$is_args$args;
proxy_cache_valid 200 48h;
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
proxy_cache_lock on;
expires 1y;
add_header Cache-Control public;
add_header 'Access-Control-Allow-Origin' '*';
add_header X-Cache-Status $upstream_cache_status;
'';
proxyPass = "https://f000.backblazeb2.com/file/cache-chir-rs/";
locations."/" = {
extraConfig = ''
limit_except GET {
deny all;
}
proxy_set_header Authorization ${"''"};
proxy_hide_header Set-Cookie;
proxy_hide_header 'Access-Control-Allow-Origin';
proxy_hide_header 'Access-Control-Allow-Methods';
proxy_hide_header 'Access-Control-Allow-Headers';
proxy_ignore_headers Set-Cookie;
proxy_intercept_errors off;
proxy_cache akkoma_media_cache;
proxy_cache_key $host$uri$is_args$args;
proxy_cache_valid 200 48h;
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
proxy_cache_lock on;
expires 1y;
add_header Cache-Control public;
add_header 'Access-Control-Allow-Origin' '*';
add_header X-Cache-Status $upstream_cache_status;
'';
proxyPass = "https://f000.backblazeb2.com/file/cache-chir-rs/";
};
};
}