Skip to content
Snippets Groups Projects
Commit 4fc033ba authored by Eugen Ciur's avatar Eugen Ciur
Browse files

build host from window.location.origin

parent f674f182
No related branches found
No related tags found
Loading
...@@ -44,6 +44,10 @@ export default class AuthToken extends Base { ...@@ -44,6 +44,10 @@ export default class AuthToken extends Base {
} }
get base_url() { get base_url() {
return `${ENV.APP.HOST}/${ENV.APP.NAMESPACE}/`; if (!ENV.APP.HOST) {
return `${window.location.origin}/${ENV.APP.NAMESPACE}`;
}
return `${ENV.APP.HOST}/${ENV.APP.NAMESPACE}`;
} }
} }
...@@ -18,7 +18,7 @@ module.exports = function (environment) { ...@@ -18,7 +18,7 @@ module.exports = function (environment) {
}, },
APP: { APP: {
NAMESPACE: '', NAMESPACE: 'api',
WS_NAMESPACE: 'ws' // websockets namespace WS_NAMESPACE: 'ws' // websockets namespace
// Here you can pass flags/options to your application instance // Here you can pass flags/options to your application instance
// when it is created // when it is created
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment