cookie fix

This commit is contained in:
Felix Albrigtsen 2022-04-23 14:02:01 +02:00
parent cf303eb6c9
commit 8f78f3672e
1 changed files with 6 additions and 3 deletions

View File

@ -45,6 +45,9 @@ app.use(require('express-log-url'));
// Serve static files from the React app // Serve static files from the React app
app.use('/', express.static(path.join(__dirname, 'clientbuild'))); app.use('/', express.static(path.join(__dirname, 'clientbuild')));
app.use('/login', express.static(path.join(__dirname, 'clientbuild', 'index.html'))); app.use('/login', express.static(path.join(__dirname, 'clientbuild', 'index.html')));
app.use('/history', express.static(path.join(__dirname, 'clientbuild', 'index.html')));
app.use('/admins', express.static(path.join(__dirname, 'clientbuild', 'index.html')));
app.use('/profile', express.static(path.join(__dirname, 'clientbuild', 'index.html')));
app.use('/tournament/*', express.static(path.join(__dirname, 'clientbuild', 'index.html'))); app.use('/tournament/*', express.static(path.join(__dirname, 'clientbuild', 'index.html')));
app.use('/static', express.static(path.join(__dirname, 'clientbuild/static'))); app.use('/static', express.static(path.join(__dirname, 'clientbuild/static')));
app.use('/static/*', express.static(path.join(__dirname, 'clientbuild/static'))); app.use('/static/*', express.static(path.join(__dirname, 'clientbuild/static')));
@ -83,8 +86,8 @@ passport.use(new GoogleStrategy({
)); ));
app.get('/auth/google', app.get('/auth/google',
passport.authenticate('google', { scope : ['profile', 'email'] passport.authenticate('google', { scope : ['profile', 'email']})
})); );
app.get('/auth/google/callback', app.get('/auth/google/callback',
passport.authenticate('google', { failureRedirect: '/error' }), passport.authenticate('google', { failureRedirect: '/error' }),
@ -531,4 +534,4 @@ api.get("/dumpsession", async (req, res) => {
console.log(out); console.log(out);
res.json(out); res.json(out);
}); });
// #endregion // #endregion