So far boringproxy has been a wonderful solution for me, but I continually have errors with redirects to 127.0.0.1
With Nextcloud (docker) I solved it using the OVERWRITEHOST environment variable, but I haven’t found equivalent options for other services.
For example, today I set up Collabora Online using docker for nextcloud, but accessing a document produces this error:
Content Security Policy: The page’s settings blocked the loading of a resource at https://127.0.0.1:9980/browser/bacb4ed/cool.html?WOPISrc=https%3A%2F%2Fnextcloud.example.com%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F304_oc3h2gxy8mbl&title=test.odt&lang=en&closebutton=1&revisionhistory=1 (“form-action”).
Another example is DokuWiki. Upon saving a file or logging in, the browser recieves a 302 FOUND error and redirects to 127.0.0.1:
I noticed some other users experienced similar errors such as
github boringproxy issue #8
Also, a statement was made on github boringproxy issue #43 saying
Unfortunately there isn’t much boringproxy can do in these situations. Each individual server software has to be configured to run behind a reverse proxy. It might be easier to first get your setup working with Caddy or nginx, then try boringproxy, because it’s far less likely that those programs have bugs.
Other reverse proxies, such as Apache and Nginx, have many advanced configuration options such as the ones needed for collabora online editor which use
proxy_set_header Host $http_host; to ensure this error doesn’t occur.
Is there any way boringproxy could be configured to do the same thing? I noticed here that boringproxy uses the
X-Forwarded-For header, perhaps the Host header could be set as well?