0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-24 19:17:48 +01:00
wagtail/client/storybook/middleware.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
393 B
JavaScript
Raw Permalink Normal View History

/* eslint-disable @typescript-eslint/no-var-requires, import/no-extraneous-dependencies */
const middleware = require('storybook-django/src/middleware');
const origin = process.env.TEST_ORIGIN ?? 'http://localhost:8000';
module.exports = middleware.createDjangoAPIMiddleware({
origin,
// Must match the patterns in urls.py.
apiPath: ['/pattern-library/', '/static/wagtailadmin/'],
});