turbolinks/turbolinks-ios

Allow opening of subdomain

gearoidoceallaigh opened this issue · 1 comments

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?

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?