Preview missing due to incorrect HTTPS config


(Jay Pfaffman) #1

Continuing the discussion from 404 after discourse upgrade on subfolder install:

The subfolder install that I just updated seems to work find except that the preview pane is empty. I tried safe mode and rebuilt just a little while ago and it still looks like this:


(Jeff Atwood) #2

This sometimes happens when the HTTPS config is wrong and force_https was not set.


(Jay Pfaffman) #3

Well, force https was not set, but setting it and hard-reloading the page didn’t solve the problem.

And it worked until the most recent upgrade. (I can’t remember what version it was before I upgraded).


(Jeff Atwood) #4

No reports of this on our end, so it’s something specific to that site or config.

Did you hard refresh after setting force https? Maybe even reboot the server. There could be bad caching possibly etc.


(Jay Pfaffman) #5

Yup. I now see in the Javascript console that it’s requesting assets/markdown-it-bundle-7a0b2d7a0cacaef5247d83cb64bb33f0674bc82201f35a6801dec3e75f0f36af.js’.

and that

This request has been blocked; the content must be served over HTTPS.

It would seem like a control-shift-reload would fix that. Maybe if I rebuild again.


(Jay Pfaffman) #6

I found a problem with the reverse proxy config.

        RequestHeader set X-Forwarded-Proto "https"

wasn’t set. This solved some problems with Memberful logins.

There is still no preview. I’ve rebuilt, rebooted, hard reloaded, quit browsers on two computers, tried safe mode. (Only docker_manager and discourse-assign plugins are installed).

I see no errors in the Javascript , Network, security tabs in Crome dev tools (no preview in Firefox either). It worked until upgrading to 2.0 beta.

Where can I look to see what might be wrong?


(Sam Saffron) #7

I would probably try to force_https a bit harder. Enable setting, restart site.


(Jay Pfaffman) #8

It’s been set (I think it was all along) , and since I’ve checked it (and tweaked the apache config) , I’ve rebuilt, rebooted, and reloaded.


(Peter) #9

Thanks a lot! Setting this for nginx solved the issue for me:

proxy_set_header X-Forwarded-Proto "https";

#10

exactly the same problem:
i can see the preview while typing this here, but not on our own installation because ff says it blocked an http resource (the markdown-it-bundle @pfaffman mentioned above). if i tell ff not to block anything, it works.

now looking at the source of this website it says:

Discourse.MarkdownItURL = 'https://d11a6trkgmumsb.cloudfront.net/assets/markdown-it-bundle....

the same line of source in our installation says:

Discourse.MarkdownItURL = 'http://discourse.vvvv.org/assets/markdown-it-bundle....

so clearly our installation is looking for an http source when it shouldn’t?! our backend says we’re running “v2.1.0.beta1 +14” and are uptodate. force_https is set.

anything we could be doing wrong?