Example #1
0
func (h *humanstxt) Response(ctx skipper.FilterContext) {
	r := ctx.Response()
	r.StatusCode = 200
	r.Header.Set("Content-Type", "text/plain")
	r.Header.Set("Content-Length", strconv.Itoa(len(text)))
	r.Body.(io.Writer).Write([]byte(text))
}
Example #2
0
func (h *typ) Response(ctx skipper.FilterContext) {
	ctx.Response().StatusCode = 200
}
Example #3
0
func (f *Filter) Response(ctx skipper.FilterContext) {
	copyHeader(ctx.Response().Header, f.ResponseHeaders)
}
Example #4
0
// sets the configured header for the response
func (f *impl) Response(ctx skipper.FilterContext) {
	ctx.Response().Header.Add(f.Key(), f.Value())
}