Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProxyServer ¶
type ProxyServer struct {
*ProxyServerOptions
// contains filtered or unexported fields
}
func NewProxyServer ¶
func NewProxyServer(options *ProxyServerOptions) *ProxyServer
func (*ProxyServer) Handler ¶
func (p *ProxyServer) Handler() func(http.ResponseWriter, *http.Request)
type ProxyServerOptions ¶
type ProxyServerOptions struct {
Target *url.URL // proxy target
UseSSL bool // use SSL
ReqHeaders http.Header // set request headers
ResHeaders http.Header // set response headers
ProxyExternal bool // whether to proxy external host
ProxyExternalIgnores []string // the host name that should ignore when enable proxy external
Cors bool // whether enable cors
NoCache bool // disabled cache for response
OverwriteFolder string // overwrite request with paths
}
Click to show internal directories.
Click to hide internal directories.
