Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { IsProxy bool `json:"isProxy"` // true if reverse proxy Host string `json:"host"` // to match against request Host header ForwardTo string `json:"forwardTo"` // non-empty if reverse proxy Serve string `json:"serve"` // non-empty if file server Secured bool `json:"secured"` // true if the handler is JWT secured Login string `json:"login"` // Basic auth login for automatic login Password string `json:"password"` // Basic auth password for automatic login Roles []string `json:"roles"` // Roles allowed to access the app }
App represents a app serving static content proxying a web server
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements an http.Handler that acts as either a reverse proxy or a simple file server, as determined by a rule set.
func NewServer ¶
func NewServer(file string, portFromMain int, frameSourceFromMain string, mainHostNameFromMain string, authzFromMain authzFunc) (*Server, error)
NewServer constructs a Server that reads apps from file
func (*Server) HostPolicy ¶
HostPolicy implements autocert.HostPolicy by consulting the apps list for a matching host name.
Click to show internal directories.
Click to hide internal directories.