Skip to content
Snippets Groups Projects

Update: Read API Hostname from LocalStorage

Merged Petar Hristov requested to merge Issue/xxxx-configurableApiHostname into dev
1 file
+ 5
1
Compare changes
  • Side-by-side
  • Inline
@@ -90,6 +90,10 @@ if (typeof window !== 'undefined') {
}
const getHostName = () => {
const localStorageHostName = typeof window !== 'undefined' ? localStorage.getItem('coscine.api.hostname') : null;
if (localStorageHostName) {
return localStorageHostName;
}
let hostName = typeof window !== 'undefined' ? window.location.hostname : 'coscine.rwth-aachen.de';
if (hostName.indexOf(':') !== -1) {
if (hostName.indexOf('https://') !== -1) {
@@ -103,4 +107,4 @@ const getHostName = () => {
";
return Task.FromResult(combinationFileText);
}
}
\ No newline at end of file
}
Loading