A small story about long polling base url

(Ionuț Staicu) #1

I just found out something the hard way.

Few days ago I tried to set up a CDN, but i failed (fastly tutorial is not matching too much of the fastly actual config options, and amazon’s cloudfront has a million options that I wasn’t to sure what everything did, so I ditched the whole thing)

Fast forward couple of days and I noticed that something strange happens: I don’t receive any real time notification anymore and in chrome console I had a lot of red messages containing something like:


(no typo here)

At first I thought it’s something in the Discourse (afterall it started suddenly, no?). So i started to dig into Discourse source code, searching for a romessage-bus string.

Then it hit me: since the domain is mydomain.ro, a slash should miss, and the string should actually be mydomain.ro/message-bus!

It turned out that one of the thing I set up first was to change long polling base url value, from the default / to the site url without the final /.

TLDR version: please automagically add that final slash! :smiley:

Subfolder Issues
(Kane York) #2

Site setting validation regex of \/$ ?

Non-standard port breaks uploads
(Jeff Atwood) #3

Yeah we should fix this in the validator. Can you PR?

Non-standard port breaks uploads
(Seth Herr) #4

Doesn’t appear to have been PRed. Just updating the form suggestion would be great - Base URL used for long polling (when a CDN is serving dynamic content, be sure to set this to origin pull) eg: http://origin.site.com to include a trailing slash http://origin.site.com/

(Joshua Rosenfeld) #5

This is still an issue. I can PR a text change to include the trailing slash, but updating regex is beyond my skillset.