wantguns / bin

highly opinionated, minimal pastebin
https://basedbin.fly.dev
GNU Lesser General Public License v3.0
227 stars 21 forks source link

Using a different webroot for bin #17

Open DhruvaSambrani opened 1 year ago

DhruvaSambrani commented 1 year ago

I want to host the bin from myurl.com/bin, and am using caddy as a reverse proxy. ~The upload page loads fine~ while the html is fine, the js and css are requested from /assets/... instead of /bin/assets/..., but the upload form (and all other links) route as if / was the webroot. This breaks the website unless hosted on a different domain (bin.myurl.com) or on a different port.

DhruvaSambrani commented 1 year ago

See https://github.com/SergioBenitez/Rocket/issues/828. Until there is an official Rocket fix, can bin read an envar webroot and prepend it at each uri call and at mount (as per comment in linked thread)?