mirror of
https://github.com/YGGverse/YGGbro.git
synced 2026-03-31 17:45:36 +00:00
integrate texty.org.ua
This commit is contained in:
parent
b24b24a672
commit
8b1aa75ea4
6 changed files with 110 additions and 35 deletions
36
nginx/yggbro/texty.org.ua/server.conf
Normal file
36
nginx/yggbro/texty.org.ua/server.conf
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
server {
|
||||
|
||||
# HTTP/IPv6 only
|
||||
listen [::]:80;
|
||||
|
||||
# Yggdrasil only
|
||||
allow 0200::/7;
|
||||
deny all;
|
||||
|
||||
location /yggbro/texty.org.ua {
|
||||
|
||||
# Forward to server
|
||||
proxy_pass https://texty.org.ua/;
|
||||
|
||||
# Tell to server, that's proxy request
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
# Replace links
|
||||
sub_filter_once off;
|
||||
sub_filter_types *;
|
||||
|
||||
sub_filter 'http://texty.org.ua' 'http://[$server_addr]/yggbro/texty.org.ua';
|
||||
sub_filter 'https://texty.org.ua' 'http://[$server_addr]/yggbro/texty.org.ua';
|
||||
sub_filter '<script' '<!-- <script';
|
||||
sub_filter '</script>' '</script> -->';
|
||||
sub_filter 'href="/support/"' 'href="https://texty.org.ua/p/support"';
|
||||
sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/texty.org.ua/';
|
||||
sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/texty.org.ua/';
|
||||
sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/texty.org.ua/';
|
||||
sub_filter "url('/" "url('http://[$server_addr]/yggbro/texty.org.ua/";
|
||||
|
||||
# Feedback link to project repository
|
||||
sub_filter '</body>' '<a style="position:fixed;top:20px;right:20px;z-index:999" href="https://github.com/YGGverse/YGGbro/tree/main/nginx/yggbro/texty.org.ua" target="_blank">YGGbro</a></body>';
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue