File: staticPathOptions.Rd

package info (click to toggle)
r-cran-httpuv 1.6.15%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,292 kB
  • sloc: ansic: 6,499; cpp: 5,501; makefile: 103; sh: 56
file content (49 lines) | stat: -rw-r--r-- 2,049 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/static_paths.R
\name{staticPathOptions}
\alias{staticPathOptions}
\title{Create options for static paths}
\usage{
staticPathOptions(
  indexhtml = TRUE,
  fallthrough = FALSE,
  html_charset = "utf-8",
  headers = list(),
  validation = character(0),
  exclude = FALSE
)
}
\arguments{
\item{indexhtml}{If an index.html file is present, should it be served up
when the client requests the static path or any subdirectory?}

\item{fallthrough}{With the default value, \code{FALSE}, if a request is made
for a file that doesn't exist, then httpuv will immediately send a 404
response from the background I/O thread, without needing to call back into
the main R thread. This offers the best performance. If the value is
\code{TRUE}, then instead of sending a 404 response, httpuv will call the
application's \code{call} function, and allow it to handle the request.}

\item{html_charset}{When HTML files are served, the value that will be
provided for \code{charset} in the Content-Type header. For example, with
the default value, \code{"utf-8"}, the header is \code{Content-Type:
  text/html; charset=utf-8}. If \code{""} is used, then no \code{charset}
will be added in the Content-Type header.}

\item{headers}{Additional headers and values that will be included in the
response.}

\item{validation}{An optional validation pattern. Presently, the only type of
validation supported is an exact string match of a header. For example, if
\code{validation} is \code{'"abc" = "xyz"'}, then HTTP requests must have a
header named \code{abc} (case-insensitive) with the value \code{xyz}
(case-sensitive). If a request does not have a matching header, than httpuv
will give a 403 Forbidden response. If the \code{character(0)} (the
default), then no validation check will be performed.}

\item{exclude}{Should this path be excluded from static serving? (This is
only to be used internally, for \code{\link{excludeStaticPath}}.)}
}
\description{
Create options for static paths
}