wastebin icon indicating copy to clipboard operation
wastebin copied to clipboard

How to run with prefix /foo with a remote proxy?

Open MIvanchev opened this issue 5 months ago • 9 comments

When using wastebin with nginx as reverse proxy I can reach the site through https://<addr>/foo but then all the resources are fetched through https://<addr>. Any way to fix that?

MIvanchev avatar Jul 08 '25 16:07 MIvanchev

P.S.

wastebin probably needs to support X-Forwared-Prefix.

MIvanchev avatar Jul 08 '25 16:07 MIvanchev

There used to be an option to set a prefix but from a technical standpoint it was too cumbersome to keep. So Forwarded (it's an actual standard header) is probably to the way to do it. But it requires quite a bit of change, so I can't promise anything at this point.

matze avatar Jul 08 '25 19:07 matze

Thanks! That's actually a significant disadvantage IMO if prefixes aren't supported. The cumbersome option is better than nothing.

MIvanchev avatar Jul 08 '25 19:07 MIvanchev

I won't bring back the option but rather extract that info from a Forwarded header.

matze avatar Jul 08 '25 19:07 matze

That'll be perfect, I'm really eager to use it, being and Rust and so simple and straightforward, great work.

MIvanchev avatar Jul 08 '25 20:07 MIvanchev

I think this is not even necessary and it actually stems from using absolute paths in a lot of places. Are you able to test from source?

matze avatar Jul 09 '25 12:07 matze

Sure, if necessary I'll do it.

MIvanchev avatar Jul 09 '25 13:07 MIvanchev

Yeah, any news on this one, I really need a good paster :))

MIvanchev avatar Jul 21 '25 10:07 MIvanchev

Also facing this issue as I wanted to host on a different path behind Nginx

I imagine WASTEBIN_BASE_URL should apply for the JS/CSS files etc. to resolve this issue

ItIsSeven avatar Aug 01 '25 15:08 ItIsSeven