Skip to content

Commit

Permalink
Fix floodlight#9 - Properly set cport on standard ports
Browse files Browse the repository at this point in the history
  • Loading branch information
Polpetta committed Jun 1, 2018
1 parent 6836c32 commit ebf87d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pages/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@

<script type="text/javascript">

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

$.cookie('cip', ip, { expires: 7 });
$.cookie('cport', port, { expires: 7 });
Expand Down

0 comments on commit ebf87d3

Please sign in to comment.