Skip to content
Snippets Groups Projects
Commit e216c428 authored by Benedikt Heinrichs's avatar Benedikt Heinrichs
Browse files

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

Update: Read API Hostname from LocalStorage

See merge request !14
parents 89799ba3 637043e5
No related branches found
No related tags found
1 merge request!14Update: Read API Hostname from LocalStorage
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment