Middleware for generic controller
This commit is contained in:
parent
51dd9a7999
commit
645e3a797f
@ -2,6 +2,12 @@
|
||||
|
||||
module.exports = class GenericController {
|
||||
route (app) {
|
||||
app.options('*', (req, res) => res.end());
|
||||
app.options('*', emptyResponse());
|
||||
}
|
||||
};
|
||||
|
||||
function emptyResponse () {
|
||||
return function emptyResponseMiddleware (req, res) {
|
||||
res.end();
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user