Commit fdd168f9 authored by Lasse Karstensen's avatar Lasse Karstensen Committed by Tollef Fog Heen

Add short example on how to get Websockets to work

parent 7160b841
Using Websockets
----------------
Websockets is a technology for creating a bidirectional stream-based channel over HTTP.
To run websockets through Varnish you need to pipe it, and copy the Upgrade header. Use the following
VCL config to do so::
sub vcl_pipe {
if (req.http.upgrade) {
set bereq.http.upgrade = req.http.upgrade;
}
}
sub vcl_recv {
if (req.http.Upgrade ~ "(?i)websocket") {
return (pipe);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment