Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RewriteCookies ¶
RewriteCookies rewrites cookies in the response.
func StripHeaders ¶
func StripHeaders(headers HeaderDel)
StripHeaders removes hop-by-hop headers from the response or request.
Types ¶
type BodyRewriter ¶
type BodyRewriter struct { BasePath string RewriteBaseURL bool // contains filtered or unexported fields }
func NewBodyRewriter ¶
func NewBodyRewriter() *BodyRewriter
func (*BodyRewriter) AddReplace ¶
func (r *BodyRewriter) AddReplace(from, to []byte)
AddReplace adds a replacement in response body from upstream.
func (*BodyRewriter) Enabled ¶
func (r *BodyRewriter) Enabled() bool
Enabled checks if the rewriter is enabled.
func (*BodyRewriter) RewriteResponse ¶
func (r *BodyRewriter) RewriteResponse(baseURL, upstream []byte, resp *fasthttp.Response)
RewriteResponse rewrites response body.
Click to show internal directories.
Click to hide internal directories.