A little bug in js of meteor files.

10 views
Skip to first unread message

Spark

unread,
Nov 14, 2010, 8:14:19 AM11/14/10
to meteorserver
I've been banging my head because my meteor installation wasn't
working, although everything was done according to the guide. As it
turned out, my problems stemmed from me using .co.uk domain, and the
js in meteor.js / stream.html / poll.html was not correctly handling
this split domain name ending. I fixed it, it works for me, but i
wonder how can such a problem be avoided? Like a permanent fix. I
would be glad to contribute some code if anyone has any idea.

Tycoon-Master

unread,
Nov 15, 2010, 9:07:53 AM11/15/10
to meteorserver
Adding this if statement:

if (domainparts[domainparts.length-1] == 'uk') {
document.domain =
domainparts[domainparts.length-3]+"."+document.domain;
}

after the following line:

document.domain =
domainparts[domainparts.length-2]+"."+domainparts[domainparts.length-1];

should fix your problem.

Although this is a semi-permanent fix for just co.uk domains, this can
later be expanded to other 2 TLD domains with a simple array check
instead of a literal string check.

Jose Mico

unread,
Nov 15, 2010, 11:02:59 AM11/15/10
to meteorserver
I've posted a fix for this issue into:

http://code.google.com/p/meteorserver/issues/detail?id=16

cnorthwood also posted a slightly different patch.
Reply all
Reply to author
Forward
0 new messages