Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookie not properly set #9

Open
Polpetta opened this issue Jun 1, 2018 · 0 comments
Open

Cookie not properly set #9

Polpetta opened this issue Jun 1, 2018 · 0 comments

Comments

@Polpetta
Copy link

Polpetta commented Jun 1, 2018

Hi 👋
I found a bug when the UI is running on port 80 or 443. In particular, the field cport is not properly set, as window.location.host returns only the address, without the port number.

The fix is to use, in page/login.html, the following code:

var ip = window.location.host.split(':')[0];
var port = location.port || (location.protocol === 'https:' ? '443' : '80');

instead of:

var url = window.location.host.split(':');
var ip = url[0];
var port = url[1];
Polpetta added a commit to Augugrumi/floodlight-webui that referenced this issue Jun 1, 2018
@Polpetta Polpetta changed the title Cookie not set properly Cookie not properly set Jun 1, 2018
Polpetta added a commit to Augugrumi/floodlight-webui that referenced this issue Jun 1, 2018
Set cport even when connecting to port 80 or 443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant