mirror of
https://github.com/YMFE/yapi.git
synced 2025-02-17 13:49:43 +08:00
Merge branch 'dev-1.3.0' of gitlab.corp.qunar.com:mfe/yapi into dev-1.3.0
This commit is contained in:
commit
9d5167c45c
@ -20,18 +20,16 @@ let indexFile = process.argv[2] === 'dev' ? 'dev.html' : 'index.html';
|
||||
|
||||
|
||||
const app = websockify(new Koa());
|
||||
app.proxy = true;
|
||||
yapi.app = app;
|
||||
|
||||
app.use(bodyParser({multipart: true}));
|
||||
|
||||
|
||||
app.use(mockServer);
|
||||
app.use(router.routes());
|
||||
app.use(router.allowedMethods());
|
||||
|
||||
websocket(app);
|
||||
|
||||
|
||||
|
||||
app.use( async (ctx, next) => {
|
||||
if( /^\/(?!api)[a-zA-Z0-9\/\-_]*$/.test(ctx.path) ){
|
||||
ctx.path = "/"
|
||||
|
Loading…
Reference in New Issue
Block a user