Created
March 26, 2020 12:51
-
-
Save Tofandel/1ce9635335c6969b5bc0289140b925cd to your computer and use it in GitHub Desktop.
Nginx config to add any html to any proxied server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DocumentRoot /your/document/root | |
ProxyRequests off | |
ProxyPreserveHost On | |
ProxyPass / http://127.0.0.1:6000/ retry=0 | |
ProxyPassReverse / http://127.0.0.1:6000/ | |
<Location "/"> | |
AddOutputFilterByType SUBSTITUTE text/html | |
Substitute 's|</head>|<script src="my-customjs.js"></script></head>|i' | |
</Location> | |
RequestHeader set X_FORWARDED_PROTO 'https' | |
RequestHeader set X-Forwarded-Ssl on | |
RequestHeader set Accept-Encoding '' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment