umputun / remark42

comment engine
https://remark42.com
MIT License
4.84k stars 376 forks source link

Avatar image links point to localhost #1658

Closed karthink closed 1 year ago

karthink commented 1 year ago

I installed remark42 on my server using the Linux amd64 1.12.0 version.

Everything works fine except for the Avatar images. The URLs for the images look like:

http://127.0.0.1:8080/api/v1/avatar/69bf329ea1643a5276325f6aa2bc8e9745e4a91f.image

instead of

https://remark42.mydomain.com/api/v1/avatar/69bf329ea1643a5276325f6aa2bc8e9745e4a91f.image

^ I can confirm that the images are accessible at this latter link.

Here are the environment variables I'm using:

SITE=mysite
REMARK_URL="http://127.0.0.1:8080"

and my Caddy config:

remark42.mydomain.com {
  reverse_proxy http://127.0.0.1:8080
}

Is there another variable I need to set for the images to be addressed correctly? I've tried IMAGE_PROXY_HTTP2HTTPS=true, but it didn't help.

paskal commented 1 year ago

REMARK_URL should be https://remark42.mydomain.com and not localhost; that's the solution. I'll update the doc: Reproxy doc has it, but nginx doesn't.

karthink commented 1 year ago

Oh, it says that right here, at the top:

REMARK_URL - URL pointing to your Remark42 server, i.e., https://demo.remark42.com

My bad, I had the right value at some point in the install process but I must have changed it when troubleshooting something else. Everything works as expected now, thank you very much.