@ -8,6 +8,7 @@ module.exports.run = function(worker) {
|
||||
var httpServer = worker.httpServer;
|
||||
var scServer = worker.scServer;
|
||||
var store = createStore(worker.options);
|
||||
var limit = worker.options.maxRequestBody;
|
||||
|
||||
httpServer.on('request', app);
|
||||
|
||||
@ -19,8 +20,8 @@ module.exports.run = function(worker) {
|
||||
});
|
||||
|
||||
app.use(cors({ methods: 'POST' }));
|
||||
app.use(bodyParser.json());
|
||||
app.use(bodyParser.urlencoded({ extended: false }));
|
||||
app.use(bodyParser.json({ limit: limit }));
|
||||
app.use(bodyParser.urlencoded({ limit: limit, extended: false }));
|
||||
app.post('/', function(req, res) {
|
||||
if (!req.body) return res.status(404).end();
|
||||
switch(req.body.op) {
|
||||
|
Reference in New Issue
Block a user