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

Redirection on hostname-less URL leading to routing error #168

Open
kfkawalec opened this issue May 27, 2016 · 2 comments
Open

Redirection on hostname-less URL leading to routing error #168

kfkawalec opened this issue May 27, 2016 · 2 comments

Comments

@kfkawalec
Copy link

Error from Chome:
Uncaught SecurityError: Failed to execute 'pushState' on 'History': A history state object with URL 'http://jobs/' cannot be created in a document with origin 'http://salt.demo.com' and URL 'http://salt.demo.com/job_result/20160527165149335201'.

Firefox: SecurityError: The operation is insecure.

If I enter manually on url http://salt.demo.com/jobs (or any others) the everything works.
There is missing domain on http://jobs/ ? How to fix this?

@Lothiraldan Lothiraldan changed the title unable to navigate to any page Redirection on hostname-less URL leading to routing error May 30, 2016
@kfkawalec
Copy link
Author

In my enviroment i have configured api_url to the proper external host:
"API_URL": "salt.demo.com:5417"
But it do not change anything.

My API version:
salt-api 2016.3.0 (Boron)

I checked and my API is working on external host properly.
Firewall doesn't block anything.

@prhbrt
Copy link

prhbrt commented Aug 16, 2016

The problem is probably related to the PREFIX_PATH setting. If it is set to /, then at several locations, where a URL is expected, '//xyz' is injected instead of /xyz. URLs that start with // are assumed to be absolute, and hence the problem exists. Solve it by changing settings.json from

{
    # ...
    "PATH_PREFIX": "/"
}

to

{
    # ...
    "PATH_PREFIX": ""
}

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