Discourse is loading pictures from the wrong domain

Hello! I’m having some issues on my forum.

here is an example:

http://www.thestratagemmc.com/t/archers-arena-pvp-tournament/261

if I go into chrome dev tools, the src attribute of the image at the top of the thread is:

//thestratagemmc.com/uploads/default/original/1X/e2dcc4788b0b1472e5d3d46427d0cd6498de60c8.png

however, thestratagemmc.com is a redirect to www.thestratagemmc.com. If i change the src attribute to be
/uploads/default/original/1X/e2dcc4788b0b1472e5d3d46427d0cd6498de60c8.png or //www.thestratagemmc.com/uploads/default/original/1X/e2dcc4788b0b1472e5d3d46427d0cd6498de60c8.png, the image displays.

Any idea how to fix this? I have no idea why thestratagemmc.com is redirecting to www.thestratagemmc.com, I’ve checked my apache virtual hosts, haproxy config, and my domain records–nothing indicates a redirect. If I change my haproxy config to redirect www.thestratagemmc.com to thestratagemmc.com, i get a redirect loop.

I thought it might be easier to just change where the image loads from rather than solve the domain issue, but I have no idea how.

Sounds like you have the wrong URL specified for your site in app.yml?

3 Likes

Yep, I’m dumb. Thanks a lot!

Ok cool, is that the fix? I was just looking at the simplest explanation for the behavior you described.

Yep, it works. I had to edit existing pages with images to change the url they pointed to, but new uploads are working just fine. Thanks again.

3 Likes