Skip to content

Commit 5f28212

Browse files
author
Your Name
committed
angular security course
1 parent 118088b commit 5f28212

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"scripts": {
99
"ng": "ng",
10-
"start": "ng serve --proxy-config ./proxy.json",
10+
"start": "ng serve --proxy-config ./proxy.json --ssl 1 --ssl-key key.pem --ssl-cert cert.pem",
1111
"start-server": "./node_modules/.bin/ts-node ./server/server.ts --secure",
1212
"server": "./node_modules/.bin/nodemon -w ./server --ext \".ts\" --exec \"npm run start-server\"",
1313
"hash": "node ./demos/hash.js",

server/create-user.route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ async function createUserAndSession(res:Response, credentials) {
3838

3939
sessionStore.createSession(sessionId, user);
4040

41-
res.cookie("SESSIONID", sessionId);
41+
res.cookie("SESSIONID", sessionId, {httpOnly:true, secure:true});
4242

4343
res.status(200).json({id:user.id, email:user.email});
4444
}

0 commit comments

Comments
 (0)