diff --git a/app/public/js/env-vars-example.js b/app/public/js/env-vars-example.js index 19bffb6..e53a4fd 100644 --- a/app/public/js/env-vars-example.js +++ b/app/public/js/env-vars-example.js @@ -3,8 +3,8 @@ var envVars = angular.module('env-vars', []); envVars.constant('CONSTANTS', { - APIPATH: location.protocol + '//' + location.hostname + ':3000/api', + APIPATH: location.origin + '/api', PREFIX: '{{appPrefix}}', - PROXY: location.protocol + '//' + location.hostname + ':3000/api/proxy/{{appPrefix}}' + PROXY: location.origin + '/api/proxy/{{appPrefix}}' }); diff --git a/test/configs.js b/test/configs.js index b9e94f9..0abb275 100644 --- a/test/configs.js +++ b/test/configs.js @@ -68,8 +68,7 @@ describe('Config files validations', function () { it('should have generated a correct env-vars file', function (done) { global.location = { - protocol: 'http:', - hostname: 'localhost' + origin: 'http://localhost:3000' }; global.angular = { module: function(moduleName, moduleArgs) {