Removing useless code
This commit is contained in:
parent
074398c4e0
commit
d9c910cfca
2 changed files with 38 additions and 36 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue