Using last level domain instead of top level
Using last level domain instead of top level to avoid cross domain issues like CDN pictures' referer check or CORS
Hi @zaaack,
Not sure to understand what the question is, but subdomains (and wildcard subdomains) are supported.
hotel add 'cmd' --name domain # domain.dev
hotel add 'serve-assets-cmd' --name subdomain.domain # subdomain.domain.dev
Feel free to provide an example of what you want to do if it doesn't solve your issue :)
@typicode For example,
my site is mysite.com, and the CDN service we used would check the referrer header' domain whether matching mysite.com or *.mysite.com to prevent other site from using our image, but the hotel's dev domain would be blocked too.
If we could put the dev before mysite.com like dev.mysite.com or dev.subdomain.mysite.com, the local site would have the same origin to online site, the CDN image won't be blocked and also avoid lots of cross domain issues, like cookies, ajax or some absolute path resource with online domain.
Thanks for the explanation. I don't think there's a way to do this with current version of Hotel, but I'll see what I can do.
I suppose it's not possible to allow mysite.dev on the CDN?
@typicode well, it might be configurable, but most company won't let development env influence the production env( and I don't have access ).
This also avoid cross domain problems, like ajax with an absolute url to using online data, or easily sharing login state if account server is separated.
I'm running into a similar issue with our SSO systems. I need to run under the same domain in order for SSO to work. Has there been any workarounds found for this?