White Screen while using CDN

cdn

(John Arce) #1

White Screen while using CDN I’m using Cloudfront.

Script from origin 'http://d33avgd4f9uh2h.cloudfront.net' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://webgeek.ph' is therefore not allowed access. 

I got this issue few weeks a ago. still getting white screen. Any thoughts on this?

Update: It’s working on safari.

Related Issues:
http://i.webgeek.ph/1h8KwQE


Spoiler tag not working with CDN and CORS
(Travis) #2

I had the same issue with Cloudfront after my latest update. I had to rebuild with CDN disabled.


(John Arce) #3

yes I got this issue after latest update last week or so.


(Jeff Atwood) #4

Any idea on this @sam? You made a lot of CORS changes lately, I guess to get JavaScript error logging working properly.


(Sam Saffron) #5

Can you disable the “enable cdn js debugging” site setting and see if it fixes it (can be done from console if needed)

./launcher ssh app
rails c
SiteSetting.enable_cdn_js_debugging = false

Perhaps you CDN is not copying headers properly.


How to Close CDN for JS
(Travis) #6

Well, I rebuilt without CDN in order to get my forum back up in an emergency situation. I’ll test with CDN re-enabled later. For now, I do get this currently:

Image from origin 'http://s3.strats.co' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://forum.strats.co' is therefore not allowed access.

Not sure if that’s related.


(John Arce) #7

I rebuilt my container with CDN http://webgeek.ph/
so far It’s working fine with firefox, chrome and safari. Finally I will launch my site next week. :smiley:


(Justin Gordon) #8

I just upgraded and turned the CDN on, and just a blank screen, and errors on chrome or firefox, but safari works. I guess I better back out that CDN and rebuild ASAP.

Firefox

Chrome


(Jeff Atwood) #9

You need to add the CORS header to your cdn, per the text of the error in the screenshot.


(Sam Saffron) #10

Either allow the cors headers or disable cdn JavaScript error reporting in site settings


(Aahan Krish) #11

The first time or two, when I installed Discourse with CDN enabled (cloudfront domain defined in app.yml) everything worked fine.

Today I did the same thing, and it showed me the white/blank page. The console showed me the same CORS errors reported by other users above.

Then I reluctantly tried Sam’s suggestion (see below) and it worked!


(Jeff Atwood) #12

Closing this, as “enable cdn js debugging” has been off by default for a long time.


(Jeff Atwood) #13