Skip to content

Instantly share code, notes, and snippets.

@mvalipour
Last active October 20, 2016 09:14
Show Gist options
  • Select an option

  • Save mvalipour/31a4ca299b0f536d7cb33f8287d69354 to your computer and use it in GitHub Desktop.

Select an option

Save mvalipour/31a4ca299b0f536d7cb33f8287d69354 to your computer and use it in GitHub Desktop.
var config = settings.domains[this.url.domain];
if(!config) {
return this.error("invalid domain");
}
if(config.subdomains && this.user.subdomain !== this.url.subdomain) {
return this.redirectToSubDomain();
}
// continue normally
{
"domains": {
"mywebsite.com": { "subdomains": true },
"cloudapp.net": { }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment