Skip to content
Snippets Groups Projects
Commit b23b4cd5 authored by Petar Hristov's avatar Petar Hristov :speech_balloon:
Browse files

Merge branch 'Issue/xxxx-configurableApiHostname' into 'dev'

Update: Read API Hostname from LocalStorage

See merge request !99
parents e20a021a ca15e1b6
No related branches found
No related tags found
2 merge requests!101merge dev into main,!99Update: Read API Hostname from LocalStorage
......@@ -45,6 +45,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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment