Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ProxyDisallowList = []string{ headers.AccessControlAllowOrigin, headers.AccessControlAllowMethods, headers.AccessControlAllowHeaders, headers.AccessControlExposeHeaders, headers.AccessControlMaxAge, headers.AccessControlAllowCredentials, }
ProxyDisallowList describes headers which are not proxied back.
Functions ¶
func ProxyRequest ¶
func ProxyRequest(r *http.Request, proxyMethod, endpoint string) (proxiedRequest *http.Request, err error)
ProxyRequest proxies a request to a new endpoint. The method can also be changed. Headers are sanitised during the process.
func ProxyResponse ¶
ProxyResponse proxies a response to a writer. Headers are sanitised and some headers such as CORS headers will be removed from the response.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.