Skip to content
Snippets Groups Projects
Commit 3bb10c87 authored by François Agneray's avatar François Agneray
Browse files

Include base href for construct apiUrl

parent 60df09f5
No related branches found
No related tags found
1 merge request!29Develop
Pipeline #6405 passed
Pipeline: anis-next

#6406

    ...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
    export const getHost = (apiUrl: string): string => { export const getHost = (apiUrl: string): string => {
    if (!apiUrl.startsWith('http')) { if (!apiUrl.startsWith('http')) {
    const url = window.location; const url = window.location;
    return url.protocol + '//' + url.host + apiUrl; return url.protocol + '//' + url.host + document.getElementsByTagName('base')[0].getAttribute('href') + apiUrl;
    } }
    return apiUrl; return apiUrl;
    } }
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment