Add nginx-lor.conf

This commit is contained in:
lost+skunk 2024-07-14 15:36:42 +00:00
parent c64bd3ca48
commit 780c236f20

36
nginx-lor.conf Normal file
View File

@ -0,0 +1,36 @@
proxy_http_version 1.1;
proxy_pass https://www.linux.org.ru/;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Accept-Encoding "";
proxy_method GET;
sub_filter_once off;
sub_filter 'https://www.linux.org.ru/' 'http://$host:$server_port/';
sub_filter '<base href="https://www.linux.org.ru/">' '<base href="http://$host:$server_port/">';
sub_filter_types *;
sub_filter '<script type="text/javascript">' '<!-- <script type="text/javascript">';
sub_filter '<script>' '<-- <script>';
sub_filter '</script>' '</script> -->';
sub_filter 'as="script"' 'as="gowno"';
sub_filter '<link rel="yandex-tableau-widget" href="/manifest.json">' '';
sub_filter '<img src="/adv/qrator-box.png" width="250" style="max-width: 100%; height: auto" alt="Protected by Qrator">' '';
sub_filter '<script type="text/javascript" src="//an.yandex.ru/system/context.js" async=""></script>' '';
sub_filter '<a href="https://www.linux.org.ru/register.jsp">Регистрация</a>' '<a href="http://[300:eaff:7fab:181b::e621]/">skunk-lover.ygg</a>';
sub_filter '<a id="loginbutton" href="https://www.linux.org.ru/login.jsp">Вход</a>' '<a>2024</a>';
sub_filter 'yandex.ru' 'ninuzhno.org';
sub_filter '<title>LINUX.ORG.RU — Русская информация об ОС Linux</title>' '<title>LINUX.ORG.RU @ YGG — Русская информация об ОС Linux</title>';
limit_except GET {
deny all;
}
if ($uri ~ "login") {
return 404;
}
if ($uri ~ "register") {
return 404;
}
if ($uri ~ "add") {
return 404;
}