proxy

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RewriteCookies

func RewriteCookies(tls bool, host string, resp *fasthttp.Response)

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.

type HeaderDel

type HeaderDel interface {
	Del(string)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL