0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-30 01:46:24 +01:00
wagtail/client/storybook/middleware.js
LB (Ben Johnston) 7c9b6fd415
Cleanup - eslint config fixes (#8543)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-05-20 16:08:13 +01:00

11 lines
393 B
JavaScript

/* 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/'],
});