Discourse sending HTTP instead of HTTPS links in activation emails


(Jeremiah Schultz) #1

Using lets encrypt for SSL. It shows in my Browser that the site is fully secured.

As I said the activation emails are a http link, when clicked it redirects to https and shows: Oops! That page doesn’t exist or is private.

Any idea what the problem is? Ive never had this happen when installing discourse before.

Thanks


(Régis Hanol) #2

Did you enable the “force_https” site setting?


(Jeremiah Schultz) #3

Nope this is for the admin activation. So haven’t been in to be able to do that


(Jeremiah Schultz) #4

Oh also i am using EC2. i am also NOT using an elastic IP which I saw can cause problems.


(Jay Pfaffman) #5

Try replacing the http with https rather than clicking and being redirected?


(Jeremiah Schultz) #6

yah i tried that too, still redirects.


(Jay Pfaffman) #7

When I had a similar problem, change the URL to https worked.

You can do this to set up your admin account:

cd /var/discount
./launcher enter app
rake admin:create

Then you can turn on force_htps.


(Jeremiah Schultz) #8

Thanks I tried that and it seems to be working. The strange thing is though if I right click the link & click copy link… copies a large number of random letter and numbers:

Is it supposed to do this?

Anyway thanks again for the help!! :grinning:
Clicking the link >> https://xxxxxxxxxxx.com/u/activate-account/171b4972bbe58a425a66d4cf3163ffee

Copying the link >>> http://send.xxxxxxxxxxxxxxxxxxxx.com/wf/click?upn=mndsI9g0jfyx09-2BnWHhxXHvb9TcaOcgQ9uDeG5Dd48wJXAku0RUHOxHlMCeMXL31kmVl3CFvGiRnV7shNivNiZY5VHqnVitqvx9tH3PUPqKxARdy0Gdlq7Es8i3fMS43_vF-2Fadl-2Boajf7-2BmvqqkpOjQuX0niw4IL5vGk9V5t-2BTUouzg3OVzDSMO0RT61dWTPoLBolWGcGEy9cRPfI7fWGxk69rbRA9cuHr7iMJNrOaAwMRaG-2F5eNYIkHK91zT0doScNGwQPgGTmfUxCx8Gcsk0saRRli5id18dsqitErWAZjtm8SZALxu4B8Kfx-2BuUxgXQbYGlvSEI-2FuWZKuvwgINpGKcn-2Frere9O1mFTTV5GQFI-3D


(Jay Pfaffman) #9

It looks like your email provider is helpfully re-writing the URLs for you for click tracking. You’ll want to figure out how to turn that off.