Skip to content
This repository has been archived by the owner on Sep 25, 2021. It is now read-only.

Allow opening of subdomain #149

Open
gearoidoceallaigh opened this issue Dec 5, 2018 · 1 comment
Open

Allow opening of subdomain #149

gearoidoceallaigh opened this issue Dec 5, 2018 · 1 comment

Comments

@gearoidoceallaigh
Copy link

Is it possible to allow visits to subdomains? When the user first opens our app, they're asked to choose a location (eg. US, UK, DE, etc). This in turn sets their subdomain.

Unfortunately, switching from "https://example.com" to "https://uk.example.com" causes the following error:

Blocked attempt to use history.pushState() to change session history URL from https://example.com/ to https://uk.example.com/. Protocols, domains, ports, usernames, and passwords must match

Is there a way to get around this?

The plist file has an App Transport Security setting for allow subdomains - perhaps that could be useful?

@sstephenson
Copy link
Contributor

The history API is subject to the browser's same-origin policy, so you must perform a full page load in order to visit a page on a different subdomain.

Turbolinks already knows not to handle <a href> links that point to a different subdomain, so your situation must be different. Could you tell me a little bit more about your setup?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants