Skip to content

Commit

Permalink
Made changes to the cookie attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
sikehish committed Jun 9, 2024
1 parent 73841e9 commit 0aa4786
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions backend/controllers/userController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export const userLogin = asyncWrapper(async (req: Request, res: Response) => {
res.cookie('token', token, {
httpOnly: true,
// secure: process.env.NODE_ENV === 'production',
secure: true,
// secure: true,
// sameSite: 'strict',
sameSite: "none",
maxAge: 5 * 24 * 60 * 60 * 1000
Expand Down Expand Up @@ -180,7 +180,7 @@ export const adminLogin = asyncWrapper(async (req, res) => {
res.cookie('token', token, {
httpOnly: true,
// secure: process.env.NODE_ENV === 'production',
secure: true,
// secure: true,
// sameSite: 'strict',
sameSite: "none",
maxAge: 5 * 24 * 60 * 60 * 1000
Expand Down
1 change: 1 addition & 0 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
build:
context: ./frontend
ports:
- "5173:5000"
- "80:80"
volumes:
- /app/node_modules
- ./frontend:/app
Expand Down

0 comments on commit 0aa4786

Please sign in to comment.