Skip to content

Commit

Permalink
Merge pull request #17 from patagonaa/server-address-port
Browse files Browse the repository at this point in the history
fix automatic port assumption for https
  • Loading branch information
danesparza committed Oct 10, 2019
2 parents ba10814 + 3ced017 commit 9d6a6fd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,13 @@ class Settings extends Component {
let parser = document.createElement('a');
parser.href = this.state.AddServerUrl;

let port = parser.port || "80";
let protocol = parser.protocol || "http:";
let path = ""
if(parser.pathname !== "/" || parser.hash !== "" || parser.search !== ""){
path = parser.pathname + parser.hash + parser.search;
}

let serverUrl = `${protocol}//${parser.hostname}:${port}${path}`;
let serverUrl = `${protocol}//${parser.host}${path}`;

// Add the server
console.log("Adding server..." + this.state.AddServerName);
Expand Down

0 comments on commit 9d6a6fd

Please sign in to comment.