summaryrefslogtreecommitdiffstats
path: root/docs/en/cowboy/2.2/guide/cookies/index.html
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-04-04 13:13:37 +0200
committerLoïc Hoguin <[email protected]>2018-04-04 13:13:37 +0200
commitd2a3f2cedd7c00d0933222aed9c06b3149aa4db4 (patch)
tree4f1499bac639c782b250af0fbf0dec2064315813 /docs/en/cowboy/2.2/guide/cookies/index.html
parent1d654719f5fa6be67d2c95145872068665702cb7 (diff)
downloadninenines.eu-d2a3f2cedd7c00d0933222aed9c06b3149aa4db4.tar.gz
ninenines.eu-d2a3f2cedd7c00d0933222aed9c06b3149aa4db4.tar.bz2
ninenines.eu-d2a3f2cedd7c00d0933222aed9c06b3149aa4db4.zip
Cowboy 2.3.0
Diffstat (limited to 'docs/en/cowboy/2.2/guide/cookies/index.html')
-rw-r--r--docs/en/cowboy/2.2/guide/cookies/index.html24
1 files changed, 13 insertions, 11 deletions
diff --git a/docs/en/cowboy/2.2/guide/cookies/index.html b/docs/en/cowboy/2.2/guide/cookies/index.html
index 28a3759c..8ffe34cb 100644
--- a/docs/en/cowboy/2.2/guide/cookies/index.html
+++ b/docs/en/cowboy/2.2/guide/cookies/index.html
@@ -7,7 +7,7 @@
<meta name="description" content="">
<meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
- <meta name="generator" content="Hugo 0.30.2" />
+ <meta name="generator" content="Hugo 0.37.1" />
<title>Nine Nines: Using cookies</title>
@@ -95,7 +95,7 @@ update the expiration time and avoid losing a cookie.</p></div>
<div class="sectionbody">
<div class="paragraph"><p>By default cookies are defined for the duration of the session:</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -103,7 +103,7 @@ http://www.gnu.org/software/src-highlite -->
<span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:set_resp_cookie</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"sessionid"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">SessionID</span>, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
<div class="paragraph"><p>They can also be set for a duration in seconds:</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -112,7 +112,7 @@ http://www.gnu.org/software/src-highlite -->
#{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">3600</span>})<span style="color: #990000">.</span></tt></pre></div></div>
<div class="paragraph"><p>To delete cookies, set <code>max_age</code> to 0:</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -122,7 +122,7 @@ http://www.gnu.org/software/src-highlite -->
<div class="paragraph"><p>To restrict cookies to a specific domain and path, the options
of the same name can be used:</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -134,7 +134,7 @@ in the path hierarchy.</p></div>
<div class="paragraph"><p>To restrict cookies to secure channels (typically resources
available over HTTPS):</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -143,7 +143,7 @@ http://www.gnu.org/software/src-highlite -->
#{<span style="color: #0000FF">secure</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>})<span style="color: #990000">.</span></tt></pre></div></div>
<div class="paragraph"><p>To prevent client-side scripts from accessing a cookie:</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -164,7 +164,7 @@ involve parsing the cookie header(s) and so should not
be called repeatedly.</p></div>
<div class="paragraph"><p>You can get all cookies as a key/value list:</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -175,7 +175,7 @@ only the ones you need, while at the same time doing
any required post processing using <a href="../constraints">constraints</a>.
This function returns a map:</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -185,7 +185,7 @@ them. The following snippet will crash if the <code>id</code> cookie is
not an integer number or if the <code>lang</code> cookie is empty. Additionally
the <code>id</code> cookie value will be converted to an integer term:</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -196,7 +196,7 @@ will be a list of the two cookie values.</p></div>
if the <code>lang</code> cookie is not found. It will not be used if
the cookie is found but has an empty value:</p></div>
<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -261,6 +261,8 @@ exception is thrown.</p></div>
+ <li><a href="/docs/en/cowboy/2.3/guide">2.3</a></li>
+
<li><a href="/docs/en/cowboy/2.2/guide">2.2</a></li>
<li><a href="/docs/en/cowboy/2.1/guide">2.1</a></li>