diff --git a/src/static/app/src/utilities/fetch.js b/src/static/app/src/utilities/fetch.js index bad0428..a24f54e 100644 --- a/src/static/app/src/utilities/fetch.js +++ b/src/static/app/src/utilities/fetch.js @@ -19,7 +19,8 @@ const getUrl = (url) => { if (apiKey){ return `${apiKey.host}${url}` } - return `//${window.location.host}${window.location.pathname}${url}` + return window.location.hostname === 'localhost' ? url + : `${window.location.protocol}//${window.location.host}${window.location.pathname}${url}` } export const fetchGet = async (url, params=undefined, callback=undefined) => {