Discover Packages
github.com/wzhliang/caddy
caddyhttp
header
package
Version:
v0.9.2
Opens a new window with list of versions in this module.
Published: Sep 20, 2016
License: Apache-2.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation Source Files Overview Index Constants Variables Functions Types type Header type Headers type Rule (h) ServeHTTP(w, r)
Documentation
¶
Package header provides middleware that appends headers to
requests based on a set of configuration rules that define
which routes receive which headers.
Header represents a single HTTP header, simply a name and value.
Headers is middleware that adds headers to the responses
for requests matching a certain path.
ServeHTTP implements the httpserver.Handler interface and serves requests,
setting headers on the response according to the configured rules.
type Rule struct {
Path string
}
Rule groups a slice of HTTP headers by a URL pattern.
TODO: use http.Header type instead?
Source Files
¶
Click to show internal directories.
Click to hide internal directories.