Parse x-www-form-urlencoded data
This commit is contained in:
@ -20,6 +20,7 @@ module.exports.run = function(worker) {
|
|||||||
|
|
||||||
app.use(cors({ methods: 'POST' }));
|
app.use(cors({ methods: 'POST' }));
|
||||||
app.use(bodyParser.json());
|
app.use(bodyParser.json());
|
||||||
|
app.use(bodyParser.urlencoded({ extended: false }));
|
||||||
app.post('/', function(req, res) {
|
app.post('/', function(req, res) {
|
||||||
if (!req.body) return res.status(404).end();
|
if (!req.body) return res.status(404).end();
|
||||||
if (!store) store = createStore(worker.options);
|
if (!store) store = createStore(worker.options);
|
||||||
|
Reference in New Issue
Block a user