CaramelFur / Picsur

An easy to use, selfhostable image sharing service like Imgur with built in converting
https://picsur.org/
GNU Affero General Public License v3.0
802 stars 42 forks source link

Host option not working behind cloudflare reverse proxy #15

Closed karmarcharger closed 1 year ago

karmarcharger commented 1 year ago

When i manually setted the docker compose behind cloudflare's proxy, environment: PICSUR_HOST: mydomain.com PICSUR_PORT: 443

[Nest] 35 - 09/14/2022, 4:46:39 PM ERROR [NestApplication] Error: listen EADDRNOTAVAIL: address not available 172.67.171.53:443

Error: listen EADDRNOTAVAIL: address not available 172.67.171.53:443

at Server.setupListenHandle [as _listen2] (node:net:1468:21)

at listenInCluster (node:net:1533:12)

at GetAddrInfoReqWrap.doListen [as callback] (node:net:1682:7)

at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:113:8) {

code: 'EADDRNOTAVAIL',

errno: -99,

syscall: 'listen',

address: '172.67.171.53',

port: 443

I am trying to set it manually because i want it to use the domain for the copying of the image sharing URL even when i am accessing it via local IP.

(I have 2FA on my domain but not my local IP so its more convenient to login via local IP)

CaramelFur commented 1 year ago

This setting only configures the binding of the server, and not the actual url you receive when generating a copyable link. The copyable link is generated on the client side, and thus just looks at your browsers location to generate the link relative to that. Right now there is no option to override this, so you'll either have to access the service via its external domain. Or edit the image links.

Maybe I'll add an option to override this tho, but I'll have to see how complicated it is to do that.

CaramelFur commented 1 year ago

It was doable, the next release will include an option to override the hostname in the copyable links.