darklynx / request-baskets

HTTP requests collector to test webhooks, notifications, REST clients and more ...
https://rbaskets.in
MIT License
351 stars 51 forks source link

Allow hosting the webapp as non-root #72

Closed jabberabbe closed 2 years ago

jabberabbe commented 2 years ago

Hi, and thanks for this software! It's extremely useful. I'm facing the following problem: I want to put request-baskets under a reverse proxy (e.g. NGINX). I hold a domain (let's say example.org) and I want to host request-baskets under a subpath of my domain (e.g. https://example.org/baskets/).

I can use a proxy_pass directive with a rewrite so that request-baskets will receive a request similar to 127.0.0.1/web instead of 127.0.0.1/baskets/web. However, it will generate links and redirects such as /web instead of /baskets/web. This breaks the user experience noticeably. I can still host under a subdomain and avoid this problem, but this is not my preferred solution.

Would it be possible to add an option to relativise all URLs or to prepend a custom string to all the endpoints?

darklynx commented 2 years ago

Hi @jabberabbe

Thank you for the interesting idea! I understand the problem you have described and extended a service with a new command line argument: -prefix, see #73

jabberabbe commented 2 years ago

Thanks again! Closing.