aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/guide/cookies.asciidoc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-09-14 18:51:11 +0200
committerLoïc Hoguin <[email protected]>2016-09-14 18:51:11 +0200
commit31cabe0fb98b4c75cb088761ba5ad53dbd2285ee (patch)
treef38d722f59530b0db689a4c06f5339620a1e5f6f /doc/src/guide/cookies.asciidoc
parenta231216b07876293dbcfde020cb0228510c5064d (diff)
downloadcowboy-31cabe0fb98b4c75cb088761ba5ad53dbd2285ee.tar.gz
cowboy-31cabe0fb98b4c75cb088761ba5ad53dbd2285ee.tar.bz2
cowboy-31cabe0fb98b4c75cb088761ba5ad53dbd2285ee.zip
Use spaces in snippets in the guide
Diffstat (limited to 'doc/src/guide/cookies.asciidoc')
-rw-r--r--doc/src/guide/cookies.asciidoc10
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/src/guide/cookies.asciidoc b/doc/src/guide/cookies.asciidoc
index 58bd1d1..33a1940 100644
--- a/doc/src/guide/cookies.asciidoc
+++ b/doc/src/guide/cookies.asciidoc
@@ -50,7 +50,7 @@ They can also be set for a duration in seconds:
----
SessionID = generate_session_id(),
Req = cowboy_req:set_resp_cookie(<<"sessionid">>, SessionID,
- #{max_age => 3600}, Req0).
+ #{max_age => 3600}, Req0).
----
To delete cookies, set `max_age` to 0:
@@ -59,7 +59,7 @@ To delete cookies, set `max_age` to 0:
----
SessionID = generate_session_id(),
Req = cowboy_req:set_resp_cookie(<<"sessionid">>, SessionID,
- #{max_age => 0}, Req0).
+ #{max_age => 0}, Req0).
----
To restrict cookies to a specific domain and path, the options
@@ -68,7 +68,7 @@ of the same name can be used:
[source,erlang]
----
Req = cowboy_req:set_resp_cookie(<<"inaccount">>, <<"1">>,
- #{domain => "my.example.org", path => "/account"}, Req0).
+ #{domain => "my.example.org", path => "/account"}, Req0).
----
Cookies will be sent with requests to this domain and all
@@ -82,7 +82,7 @@ available over HTTPS):
----
SessionID = generate_session_id(),
Req = cowboy_req:set_resp_cookie(<<"sessionid">>, SessionID,
- #{secure => true}, Req0).
+ #{secure => true}, Req0).
----
To prevent client-side scripts from accessing a cookie:
@@ -91,7 +91,7 @@ To prevent client-side scripts from accessing a cookie:
----
SessionID = generate_session_id(),
Req = cowboy_req:set_resp_cookie(<<"sessionid">>, SessionID,
- #{http_only => true}, Req0).
+ #{http_only => true}, Req0).
----
Cookies may also be set client-side, for example using