Skip to content

Commit 21fc58a

Browse files
docs: Document vcl_pipe default behavior change
1 parent 39a9dae commit 21fc58a

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

doc/sphinx/users-guide/vcl-built-in-code.rst

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,8 @@ code using::
174174
Built-in VCL reference
175175
----------------------
176176

177-
A copy of the ``builtin.vcl`` file might be provided with your Varnish
178-
installation but :ref:`varnishd(1)` is the reference to determine the code
179-
that is appended to any loaded VCL.
177+
A copy of the ``builtin.vcl`` file can be obtained by running
178+
``varnishd -x builtin``.
180179

181180
The VCL compilation happens in two passes:
182181

@@ -186,3 +185,30 @@ The VCL compilation happens in two passes:
186185

187186
Any VCL subroutine present in the built-in VCL can be extended, in which
188187
case the loaded VCL code will be executed before the built-in code.
188+
189+
Re-enabling pipe mode
190+
~~~~~~~~~~~~~~~~~~~~~
191+
192+
As of Varnish 8.0, Varnish no longer pipes unknown HTTP methods by default.
193+
Instead, it returns a 501 synthetic error. If you want to re-enable pipe
194+
mode for a specific method, you can do so by adding the following to your
195+
VCL:
196+
197+
.. code-block:: vcl
198+
199+
sub vcl_req_method {
200+
if (req.method == "CUSTOM") {
201+
return (pipe);
202+
}
203+
}
204+
205+
You can also re-enable pipe mode for a specific request, for example for
206+
WebSockets:
207+
208+
.. code-block:: vcl
209+
210+
sub vcl_recv {
211+
if (req.http.upgrade == "websocket") {
212+
return (pipe);
213+
}
214+
}

0 commit comments

Comments
 (0)