Skip to content
This repository was archived by the owner on Apr 4, 2021. It is now read-only.

Commit 6123d57

Browse files
committed
Use HttpOnly attribute for prohibiting access from JavaScript.
1 parent 2fe3570 commit 6123d57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@app.route('/index/', methods=["GET"])
77
def index():
88
response = make_response("Here, take some cookie!")
9-
response.headers["Set-Cookie"] = "my-first-cookie=some-cookie-value"
9+
response.headers["Set-Cookie"] = "my-first-cookie=some-cookie-value; HttpOnly"
1010
return response
1111

1212

0 commit comments

Comments
 (0)