# singpolyma-http-rewriting-proxy -rw-r--r-- 929 bytes View raw
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<VirtualHost *:443>
	ServerName git.singpolyma.net

	SSLProxyEngine On

	ProxyPass /robots.txt https://git.sr.ht/robots.txt
	ProxyPassReverse /robots.txt https://git.sr.ht/robots.txt

	ProxyPass / https://git.sr.ht/~singpolyma/
	ProxyPassReverse  / https://git.sr.ht/~singpolyma/
	ProxyPassReverseCookieDomain .sr.ht git.singpolyma.net

	ProxyHTMLEnable On
	ProxyHTMLExtended On
	ProxyHTMLDocType "<!DOCTYPE html>" XML
	ProxyHTMLURLMap https://git.sr.ht/~singpolyma/ /
	ProxyHTMLURLMap /~singpolyma/ /
	ProxyHTMLURLMap /%7Esingpolyma/ /
	ProxyHTMLURLMap /static/ https://git.sr.ht/static/
	ProxyHTMLURLMap /clone https://git.sr.ht/clone

	AddOutputFilterByType SUBSTITUTE text/html
	Substitute s|https://git.sr.ht/~singpolyma/|https://git.singpolyma.net/|nq
	Substitute s|<dt>read/write</dt>||nq
	Substitute s|<dd>git@git.sr.ht.*</dd>||q

	Header unset Content-Security-Policy

	RequestHeader unset Accept-Encoding
</VirtualHost>