Skip to content

Commit

Permalink
UI: Fix #3 by detecting the protocol during login
Browse files Browse the repository at this point in the history
  • Loading branch information
MacroPower committed Feb 10, 2020
1 parent e8b387a commit c789f31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/src/components/Global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function getDefaults(
session: Session,
globalSettingsActions: GlobalSettingsActions
): void {
const url = 'https://' + session.endpoint + '/example';
const url = session.endpoint + '/example';
console.log('Get settings from ' + url);

fetch(url, {
Expand Down
2 changes: 1 addition & 1 deletion ui/src/views/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function Login() {
e.preventDefault();

//eslint-disable-next-line
const host: string = location.host;
const host: string = location.protocol + '//' + location.host;

const session: Session = {
endpoint: host,
Expand Down

0 comments on commit c789f31

Please sign in to comment.