Removing useless code

This commit is contained in:
David Négrier 2020-09-30 12:16:39 +02:00
parent 074398c4e0
commit d9c910cfca
2 changed files with 38 additions and 36 deletions

View file

@ -20,18 +20,6 @@ class App {
this.config();
this.crossOrigin();
//TODO add middleware with access token to secure api
// STUPID CORS IMPLEMENTATION.
// TODO: SECURE THIS
this.app.any('/*', (res, req) => {
res.writeHeader('access-control-allow-headers', 'Origin, X-Requested-With, Content-Type, Accept');
res.writeHeader('access-control-allow-methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE');
res.writeHeader('access-control-allow-origin', '*');
req.setYield(true);
});
//create socket controllers
this.ioSocketController = new IoSocketController(this.app);
this.authenticateController = new AuthenticateController(this.app);