Skip to content

Commit

Permalink
Enable cross origin requests for lobby_api
Browse files Browse the repository at this point in the history
  • Loading branch information
Kazbek authored and Brutus5000 committed May 4, 2021
1 parent 97ccbac commit 3a8ca11
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion express.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ let bodyParser = require('body-parser');
let passport = require('passport');
let OAuth2Strategy = require('passport-oauth2');

const cors = require('cors');
const showdown = require('showdown');
const fs = require('fs');

Expand Down Expand Up @@ -161,7 +162,7 @@ app.get('/competitive/leaderboards/leagues', (function(){
}
})()
);
app.get('/lobby_api', require('./routes/lobby_api'));
app.get('/lobby_api', cors(), require('./routes/lobby_api'));
app.get('/account/checkUsername', require('./routes/views/checkUsername'));

app.get('/clans', require(routes + 'clans/get/index'));
Expand Down

0 comments on commit 3a8ca11

Please sign in to comment.