correct cookie docs (#19122)

This commit is contained in:
flywind 2021-11-11 15:53:27 +08:00 • committed by GitHub
commit 7313b70a6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,8 +51,7 @@ proc setCookie*(key, value: string, domain = "", path = "",
## Creates a command in the format of
## `Set-Cookie: key=value; Domain=...; ...`
##
## .. tip: Cookies can be vulnerable. Consider setting `secure=true`, `httpOnly=true` and `sameSite=Strict`.
## .. tip:: Cookies can be vulnerable. Consider setting `secure=true`, `httpOnly=true` and `sameSite=Strict`.
result = ""
if not noName: result.add("Set-Cookie: ")
result.add key & "=" & value