wastebin icon indicating copy to clipboard operation
wastebin copied to clipboard

Full URL on paste insert

Open GioPan04 opened this issue 10 months ago • 2 comments

When inserting a new paste the url generated to be copied only contains the path of the paste. It would be better to include the complete url (base url + path).

I have a specific use case where my pastes are generated on a local lan which has a different domain than the public one. Right now when I share a paste the browser includes the local domain when I create a new paste, that is not available on the public internet.

I can make a pull request if you consider this a valid change

GioPan04 avatar Feb 16 '25 14:02 GioPan04

This is the same issue as with the QR code. But you cannot solve the issue generally other than threading through some base URL throughout the entire code base as was done until recently because the service itself does not know where it runs and how its setup. Thus, I'd like to keep relative URLs as the base for everything because it keeps everything simple and relocatable. Stupid question: why can't you paste on the public one?

matze avatar Feb 16 '25 14:02 matze

Mhh okay. I wanted to be the only one allowed to create a paste, so I restricted nginx to allow the / route only to local IPs. To access the local version I use a domain (configured in my local DNS server) that is different from the public one

GioPan04 avatar Feb 16 '25 19:02 GioPan04