correct cookie docs (#19122)

This commit is contained in:
flywind
2021-11-11 15:53:27 +08:00
committed by GitHub
parent 036d894e6a
commit 7313b70a6a

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