librespeed / speedtest-go

Go backend for LibreSpeed
GNU Lesser General Public License v3.0
733 stars 157 forks source link

Added `url_base` parameter to customize the root url and allow hosting with another application. #41

Closed nledez closed 2 years ago

maddie commented 2 years ago

Not sure about this PR, things like this should be achieved using a reverse proxy

nledez commented 2 years ago

Indeed, in most cases, URL rewriting can be done by reverse proxies.

We can also handle static assets by serving them with Nginx if you use it as an RP. But if you use Haproxy/Traefik, these cannot serve static content.

And last problem, in some RP you can rewrite the content. But this has an impact on the performance.

But as you can see in my last commit 38c153d, the back end redirects to a static URL.

To summarize, it is a good practice for backends to be able to change the root of their URL.