From 8f78f3672e1d33fcc0da5c39210f753590f1e360 Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Sat, 23 Apr 2022 14:02:01 +0200 Subject: [PATCH] cookie fix --- src/server/index.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/server/index.js b/src/server/index.js index 94eed5e..ac3ee7f 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -45,6 +45,9 @@ app.use(require('express-log-url')); // Serve static files from the React app app.use('/', express.static(path.join(__dirname, 'clientbuild'))); 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('/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', - passport.authenticate('google', { scope : ['profile', 'email'] -})); + passport.authenticate('google', { scope : ['profile', 'email']}) +); app.get('/auth/google/callback', passport.authenticate('google', { failureRedirect: '/error' }), @@ -531,4 +534,4 @@ api.get("/dumpsession", async (req, res) => { console.log(out); res.json(out); }); -// #endregion \ No newline at end of file +// #endregion