-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
docs: clarify difference and relationship between httpOnly and secure flags
#13875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: clarify difference and relationship between httpOnly and secure flags
#13875
Conversation
|
d2d1764 to
a8b756d
Compare
|
looks like prettier/lint are broken, can't get past it, pnpm run check passes, pnpm run lint fails, i did pnpm run format and i am still stuck on linter error. |
|
IMO we should, if anything, just be linking to MDN. We shouldn't take it upon ourselves to describe general web platform features. |
httpOnly and secure flags
|
Those fields are documented as part of That seems to cover it pretty well. If some additional clarification is needed, I think it should be done there - i.e. in the |
|
Sorry guys, @benmccann @Conduitry I want to push back on this a little bit, imho that is not good enough, I don't know what to do here but I will try my best to explain and I hope this makes sense to you and others.. Long story short, myself as well as number of people looked at the documentation of relevant Currently SvelteKit docs:
That is all I can find/read about these flags in docs. @benmccann as you pointed out these fields are documented import('cookie').CookieSerializeOptions but as I user of SvelteKit: @Conduitry if as per your suggestion we should be linking to MDN let's do that, would you be kind enough to update that? @Conduitry @benmccann , at the end of the day I would love for any user reading through the documentation not to face same dilemma and confusion as me and my colleagues and I truly believe making a documentation a bit more explicit or less vague can't be that wrong? Thank you for the help and support but most of all for understanding.
|
|
I think the correct fix for this would be to update the docs generation to better handle types from external packages |
clarifies difference and relationship of
httpOnlyandsecureflags.The
httpOnlyandsecureflags are independent but complementary security features for cookies. They protect against different types of vulnerabilities.httpOnlyvssecure:httpOnly- Controls WHO can access the cookie:-
true: Only server can access (blocks client-side JavaScript)-
false: Both server and client-side JavaScript can accesssecure- Controls HOW the cookie is transmitted:-
true: Only sent over HTTPS connections-
false: Sent over both HTTP and HTTPSPlease don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits