chore: 🤖 add support for API_HOST build-time config
This commit is contained in:
5 files changed
+20
-1
No files matched your search
@@ -5,6 +5,13 @@ import { get } from '@ember/object';
|
||||
export default class ApplicationAdapter extends RESTAdapter {
|
||||
// =attributes
|
||||
|
||||
/**
|
||||
* Sets host to the `api.host` string in the application's config,
|
||||
* if set.
|
||||
* @type {string}
|
||||
*/
|
||||
host = get(config, 'api.host');
|
||||
|
||||
/**
|
||||
* Sets namespace to the `api.namespace` string in the application's config,
|
||||
* if set.
|
||||
|
||||
@@ -23,7 +23,8 @@ module.exports = function (environment) {
|
||||
},
|
||||
|
||||
api: {
|
||||
namespace: '/api/addon/v1',
|
||||
host: '',
|
||||
namespace: 'v1',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user