86 lines
2.3 KiB
Plaintext
86 lines
2.3 KiB
Plaintext
location = /__md_file {
|
|
internal;
|
|
allow all;
|
|
|
|
add_header 'Vary' 'Accept';
|
|
|
|
default_type text/html;
|
|
alias $document_root/md-renderer.html;
|
|
}
|
|
|
|
location = /md-renderer.html {
|
|
deny all;
|
|
}
|
|
|
|
location ~* \.md {
|
|
error_page 418 = /__md_file;
|
|
|
|
add_header 'Vary' 'Accept';
|
|
|
|
if (!-f $request_filename) {
|
|
break;
|
|
}
|
|
|
|
if ($http_accept !~* "text/markdown") {
|
|
return 418;
|
|
}
|
|
}
|
|
|
|
location /mirrors/repo.mongodb.org/ {
|
|
proxy_pass https://repo.mongodb.org/;
|
|
proxy_ssl_server_name on;
|
|
proxy_redirect $scheme://$host/ /mirrors/repo.mongodb.org/;
|
|
}
|
|
|
|
location /mirrors/repo.mongodb.org/pgp/ {
|
|
proxy_pass https://pgp.mongodb.com/;
|
|
proxy_ssl_server_name on;
|
|
proxy_redirect $scheme://$host/ /mirrors/repo.mongodb.org/pgp/;
|
|
sub_filter '"/"' '"/mirrors/repo.mongodb.org/pgp/"';
|
|
}
|
|
|
|
location /mirrors/grafana/rpm/ {
|
|
proxy_pass https://rpm.grafana.com/;
|
|
proxy_ssl_server_name on;
|
|
proxy_redirect $scheme://$host/ /mirrors/grafana/rpm/;
|
|
}
|
|
|
|
location /mirrors/grafana/deb/ {
|
|
proxy_pass https://apt.grafana.com/;
|
|
proxy_ssl_server_name on;
|
|
proxy_redirect $scheme://$host/ /mirrors/grafana/deb/;
|
|
}
|
|
|
|
location /mirrors/artifacts.elastic.co/ {
|
|
proxy_pass https://artifacts.elastic.co/;
|
|
proxy_ssl_server_name on;
|
|
proxy_redirect $scheme://$host/ /mirrors/artifacts.elastic.co/;
|
|
}
|
|
|
|
location /clamav/ {
|
|
proxy_pass https://packages.microsoft.com/clamav/;
|
|
proxy_ssl_server_name on;
|
|
}
|
|
|
|
location /terraform/ {
|
|
sub_filter 'href="/assets' 'href="/terraform/assets';
|
|
sub_filter 'href="/images' 'href="/terraform/images';
|
|
sub_filter 'href="/android' 'href="/terraform/android';
|
|
sub_filter 'src="/assets' 'src="/terraform/assets';
|
|
sub_filter 'default)("/github/' 'default)("/terraform/github/';
|
|
sub_filter ' integrity="' ' someshit="';
|
|
sub_filter 'terraform-registry/routes' 'terraform-registry/routes/terraform';
|
|
sub_filter_types text/javascript;
|
|
sub_filter_once off;
|
|
proxy_pass https://terraform-registry.venya.tech/;
|
|
proxy_redirect https://terraform-registry.venya.tech/ /terraform/;
|
|
}
|
|
|
|
location = / {
|
|
index index.md;
|
|
}
|
|
|
|
location / {
|
|
autoindex on;
|
|
}
|