Parse x-www-form-urlencoded data
This commit is contained in:
parent
0a8576ab86
commit
03ed564bce
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user