1Plack::Middleware::XSenUdsfeirleC(o3n)tributed Perl DocuPmleanctka:t:iMoinddleware::XSendfile(3)
2
3
4

NAME

6       Plack::Middleware::XSendfile - Sets X-Sendfile (or a like) header for
7       frontends
8

SYNOPSIS

10         enable "Plack::Middleware::XSendfile";
11

DESCRIPTION

13       When the body is a blessed reference with a "path" method, then the
14       return value of that method is used to set the X-Sendfile header.
15
16       The body is set to an empty list, and the Content-Length header is set
17       to 0.
18
19       If the X-Sendfile header is already set, then the body and Content-
20       Length will be untouched.
21
22       You should use IO::File::WithPath or Plack::Util's "set_io_path" to add
23       "path" method to an IO object in the body.
24
25       See
26       <http://github.com/rack/rack-contrib/blob/master/lib/rack/contrib/sendfile.rb>
27       for the frontend configuration.
28
29       Plack::Middleware::XSendfile does not set the Content-Type header.
30

CONFIGURATION

32       variation
33           The header tag to use. If unset, the environment key
34           "plack.xsendfile.type" will be used, then the
35           "HTTP_X_SENDFILE_TYPE" header.
36
37           Supported values are:
38
39           ·   "X-Accel-Redirect"
40
41           ·   "X-Lighttpd-Send-File"
42
43           ·   "X-Sendfile".
44
45           An unsupport value will log an error.
46

AUTHOR

48       Tatsuhiko Miyagawa
49
50
51
52perl v5.32.0                      2020-12-02   Plack::Middleware::XSendfile(3)
Impressum