Documentation ¶
Index ¶
Constants ¶
View Source
const (
ResponseCode = "response_code"
)
Variables ¶
View Source
var Logger *wrapper.Log
Functions ¶
func IsEndpointAllowed ¶
IsEndpointAllowed checks whether the endpoint URL is allowed based on an allowed domains list.
func SplitHostPort ¶
SplitHostPort separates host and port. If the port is not valid, it returns the entire input as host, and it doesn't check the validity of the host. Unlike net.SplitHostPort, but per RFC 3986, it requires ports to be numeric. *** taken from net/url, modified validOptionalPort() to accept ":*"
Types ¶
type ResponseRecorder ¶
func NewRecorder ¶
func NewRecorder() *ResponseRecorder
NewRecorder returns an initialized ResponseRecorder.
func (*ResponseRecorder) GetStatus ¶
func (rw *ResponseRecorder) GetStatus() int
func (*ResponseRecorder) Header ¶
func (rw *ResponseRecorder) Header() http.Header
func (*ResponseRecorder) WriteHeader ¶
func (rw *ResponseRecorder) WriteHeader(code int)
WriteHeader implements http.ResponseWriter.
Click to show internal directories.
Click to hide internal directories.