Skip to content

Commit

Permalink
fix: cookies issue with client
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseAlbDR committed Mar 8, 2024
1 parent d0602e0 commit b81e968
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/presentation/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ export class Server {
this.app.use(express.json()); // raw
this.app.use(express.urlencoded({ extended: true })); // x-www-form-urlencoded
this.app.use(cookieParser(envs.JWT_SEED));
this.app.use(cors());

const corsOptions = {
origin: 'http://localhost:5173',
credentials: true,
};

this.app.use(cors(corsOptions));

//* Public Folder
this.app.use(express.static(this.publicPath));
Expand Down

0 comments on commit b81e968

Please sign in to comment.