summaryrefslogtreecommitdiffstats
path: root/docs/en/cowboy/2.0/guide/cookies/index.html
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-09-14 18:52:59 +0200
committerLoïc Hoguin <[email protected]>2016-09-14 18:52:59 +0200
commit348cfe494318d0c12072fd75ff451c3b40168965 (patch)
treedc0186d61b759b248a774cd364d8cb4e073a0c41 /docs/en/cowboy/2.0/guide/cookies/index.html
parenta0db20721bee71e7c0558a83d94ac0c8927b3939 (diff)
downloadninenines.eu-348cfe494318d0c12072fd75ff451c3b40168965.tar.gz
ninenines.eu-348cfe494318d0c12072fd75ff451c3b40168965.tar.bz2
ninenines.eu-348cfe494318d0c12072fd75ff451c3b40168965.zip
Update documentation
Diffstat (limited to 'docs/en/cowboy/2.0/guide/cookies/index.html')
-rw-r--r--docs/en/cowboy/2.0/guide/cookies/index.html10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/en/cowboy/2.0/guide/cookies/index.html b/docs/en/cowboy/2.0/guide/cookies/index.html
index 04dabd33..d516af72 100644
--- a/docs/en/cowboy/2.0/guide/cookies/index.html
+++ b/docs/en/cowboy/2.0/guide/cookies/index.html
@@ -111,7 +111,7 @@ http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="color: #009900">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
<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: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">3600</span>}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+ #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">3600</span>}, <span style="color: #009900">Req0</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
@@ -120,7 +120,7 @@ http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="color: #009900">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
<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: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">0</span>}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+ #{<span style="color: #0000FF">max_age</span> <span style="color: #990000">=&gt;</span> <span style="color: #993399">0</span>}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
<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">
@@ -129,7 +129,7 @@ by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><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">"inaccount"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"1"</span><span style="color: #990000">&gt;&gt;</span>,
- #{<span style="color: #0000FF">domain</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"my.example.org"</span>, <span style="color: #0000FF">path</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"/account"</span>}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+ #{<span style="color: #0000FF">domain</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"my.example.org"</span>, <span style="color: #0000FF">path</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF0000">"/account"</span>}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
<div class="paragraph"><p>Cookies will be sent with requests to this domain and all
its subdomains, and to resources on this path or deeper
in the path hierarchy.</p></div>
@@ -142,7 +142,7 @@ http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="color: #009900">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
<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: #0000FF">secure</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+ #{<span style="color: #0000FF">secure</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>}, <span style="color: #009900">Req0</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
@@ -151,7 +151,7 @@ http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="color: #009900">SessionID</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">generate_session_id</span></span>(),
<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: #0000FF">http_only</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+ #{<span style="color: #0000FF">http_only</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">true</span>}, <span style="color: #009900">Req0</span>)<span style="color: #990000">.</span></tt></pre></div></div>
<div class="paragraph"><p>Cookies may also be set client-side, for example using
Javascript.</p></div>
</div>