diff options
Diffstat (limited to 'docs/en/cowboy/2.0/manual/cowboy_websocket/index.html')
-rw-r--r-- | docs/en/cowboy/2.0/manual/cowboy_websocket/index.html | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/docs/en/cowboy/2.0/manual/cowboy_websocket/index.html b/docs/en/cowboy/2.0/manual/cowboy_websocket/index.html index 9647657b..f09890a8 100644 --- a/docs/en/cowboy/2.0/manual/cowboy_websocket/index.html +++ b/docs/en/cowboy/2.0/manual/cowboy_websocket/index.html @@ -255,7 +255,8 @@ http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="font-weight: bold"><span style="color: #000000">opts</span></span>() <span style="color: #990000">::</span> #{
<span style="color: #0000FF">compress</span> <span style="color: #990000">=></span> <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>(),
- <span style="color: #0000FF">idle_timeout</span> <span style="color: #990000">=></span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()
+ <span style="color: #0000FF">idle_timeout</span> <span style="color: #990000">=></span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>(),
+ <span style="color: #0000FF">req_filter</span> <span style="color: #990000">=></span> <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>((<span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>()) <span style="color: #990000">-></span> <span style="font-weight: bold"><span style="color: #000000">map</span></span>())
}</tt></pre></div></div>
<div class="paragraph"><p>Websocket handler options.</p></div>
<div class="paragraph"><p>This configuration is passed to Cowboy from the <code>init/2</code>
@@ -290,6 +291,18 @@ idle_timeout (60000) the client.
</p>
</dd>
+<dt class="hdlist1">
+req_filter
+</dt>
+<dd>
+<p>
+ A function applied to the Req to compact it and
+ only keep required information. The Req is only
+ given back in the <code>terminate/3</code> callback. By default
+ it keeps the method, version, URI components and peer
+ information.
+</p>
+</dd>
</dl></div>
</div>
</div>
|