301 redirects to incorrect domain

(Stefan) #1

I udpated my discourse today and noticed that links that redirect, suddenly go to the wrong place.
Take for example: https://discuss.xible.io/t/57. That redirects to domain ‘xiblediscourse’ which is the internal hostname of my machine (whichs sits behind a reverse proxy). That link is not going to work.

Direct links such as https://discuss.xible.io/ work fine.

This also affects loading the markdown plugin. When creating a new post, xiblediscourse/assets/markdown-it-bundle-…js is loaded instead of the one hosted on discuss .xible.io

Anyone else experiencing this? I’m running 1.9.0.beta10.
Categorized this as a bug for now. Some links were shortened because I can only post 2 links as a newbie.


(Felix Freiberger) #2

On your server, in the file /var/discourse/containers/app.yml, what is DISCOURSE_HOSTNAME set to?

(Stefan) #3

Never mind, a reload of the nginx reverse proxy config was missing this line;

proxy_set_header Host $http_host;

@fefrei; thanks for the very, very fast response anyway!

(Felix Freiberger) #4

Good catch, that sounds plausible. Thanks for reporting back! :slight_smile:
I’ve moved the topic to #support accordingly.

(Kane York) #5

Make sure you also have X-Forwarded-Proto and X-Forwarded-For.