mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-08 23:25:51 +01:00
This reverts commit 67c31b69
This commit is contained in:
parent
e374a6248b
commit
844267ce25
File diff suppressed because it is too large
Load Diff
@ -3,6 +3,7 @@ import { Config } from '@verdaccio/types';
|
||||
import _ from 'lodash';
|
||||
|
||||
import express from 'express';
|
||||
import bodyParser from 'body-parser';
|
||||
import whoami from './api/whoami';
|
||||
import ping from './api/ping';
|
||||
import user from './api/user';
|
||||
@ -41,6 +42,7 @@ export default function(config: Config, auth: IAuth, storage: IStorageHandler) {
|
||||
app.param('anything', match(/.*/));
|
||||
|
||||
app.use(auth.apiJWTmiddleware());
|
||||
app.use(bodyParser.json({ strict: false, limit: config.max_body_size || '10mb' }));
|
||||
app.use(antiLoop(config));
|
||||
// encode / in a scoped package name to be matched as a single parameter in routes
|
||||
app.use(encodeScopePackage);
|
||||
|
@ -1,6 +1,5 @@
|
||||
import _ from 'lodash';
|
||||
import express, { Application } from 'express';
|
||||
import bodyParser from 'body-parser';
|
||||
import compression from 'compression';
|
||||
import cors from 'cors';
|
||||
import { HttpError } from 'http-errors';
|
||||
@ -47,8 +46,6 @@ const defineAPI = function(config: IConfig, storage: IStorageHandler): any {
|
||||
hookDebug(app, config.self_path);
|
||||
}
|
||||
|
||||
app.use(bodyParser.json({ strict: false, limit: config.max_body_size || '10mb' }));
|
||||
|
||||
// register middleware plugins
|
||||
const plugin_params = {
|
||||
config: config,
|
||||
|
Loading…
Reference in New Issue
Block a user