Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
dd050f03
Commit
dd050f03
authored
Nov 27, 2015
by
Federico G. Schwindt
Committed by
Lasse Karstensen
Jan 13, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reword and update code
parent
812ac708
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
15 deletions
+8
-15
vcl-example-websockets.rst
doc/sphinx/users-guide/vcl-example-websockets.rst
+8
-15
No files found.
doc/sphinx/users-guide/vcl-example-websockets.rst
View file @
dd050f03
Implementing websocket
support
-------------------------
-----
Adding WebSockets
support
-------------------------
Websockets is a technology for creating a bidirectional stream-based channel over HTTP.
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::
To run WebSockets through Varnish you need to pipe it as follows::
sub vcl_pipe {
if (req.http.upgrade) {
set bereq.http.upgrade = req.http.upgrade;
}
}
sub vcl_recv {
if (req.http.U
pgrade ~ "(?i)websocket") {
return (pipe);
}
if (req.http.u
pgrade ~ "(?i)websocket") {
return (pipe);
}
}
.. XXX: Pipe it? maybe a bit more explanation here? benc
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment