mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-16 21:56:40 -05:00
caddyhttp: Add a getter for Server.name (#5531)
This commit is contained in:
parent
71e27b844b
commit
c6f34011fb
1 changed files with 3 additions and 0 deletions
|
@ -669,6 +669,9 @@ func (s *Server) protocol(proto string) bool {
|
||||||
// EXPERIMENTAL: Subject to change or removal.
|
// EXPERIMENTAL: Subject to change or removal.
|
||||||
func (s *Server) Listeners() []net.Listener { return s.listeners }
|
func (s *Server) Listeners() []net.Listener { return s.listeners }
|
||||||
|
|
||||||
|
// Name returns the server's name.
|
||||||
|
func (s *Server) Name() string { return s.name }
|
||||||
|
|
||||||
// PrepareRequest fills the request r for use in a Caddy HTTP handler chain. w and s can
|
// PrepareRequest fills the request r for use in a Caddy HTTP handler chain. w and s can
|
||||||
// be nil, but the handlers will lose response placeholders and access to the server.
|
// be nil, but the handlers will lose response placeholders and access to the server.
|
||||||
func PrepareRequest(r *http.Request, repl *caddy.Replacer, w http.ResponseWriter, s *Server) *http.Request {
|
func PrepareRequest(r *http.Request, repl *caddy.Replacer, w http.ResponseWriter, s *Server) *http.Request {
|
||||||
|
|
Loading…
Reference in a new issue