mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Re-enable mirage in development with config to allow asset passthrough
This commit is contained in:
parent
337b0614ed
commit
76a1a98b48
2 changed files with 6 additions and 1 deletions
|
@ -47,7 +47,7 @@ module.exports = function (environment) {
|
|||
|
||||
// Enable mirage here in order to mock API endpoints during development
|
||||
ENV['ember-cli-mirage'] = {
|
||||
enabled: false
|
||||
enabled: true
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,10 @@ import mockWebhooks from './config/webhooks';
|
|||
// import {versionMismatchResponse} from 'utils';
|
||||
|
||||
export default function () {
|
||||
// allow any local requests outside of the namespace (configured below) to hit the real server
|
||||
// _must_ be called before the namespace property is set
|
||||
this.passthrough('/ghost/assets/**');
|
||||
|
||||
// this.urlPrefix = ''; // make this `http://localhost:8080`, for example, if your API is on a different server
|
||||
this.namespace = '/ghost/api/v2/admin'; // make this `api`, for example, if your API is namespaced
|
||||
this.timing = 400; // delay for each request, automatically set to 0 during testing
|
||||
|
@ -37,6 +41,7 @@ export default function () {
|
|||
// add any external domains to make sure those get passed through too
|
||||
this.passthrough('https://count.ghost.org/');
|
||||
this.passthrough('http://www.gravatar.com/**');
|
||||
this.passthrough('https://cdn.jsdelivr.net/**');
|
||||
}
|
||||
|
||||
// Mock all endpoints here as there is no real API during testing
|
||||
|
|
Loading…
Add table
Reference in a new issue