Version: v0.0.0-...-cfe1fc8 Latest Latest

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

Go to latest
Published: Jun 15, 2020 License: BSD-3-Clause Imports: 9 Imported by: 2



extension to goproxy that will allow you to easily filter web browser related content.



This section is empty.


View Source
var IsCss goproxy.RespCondition = goproxy.ContentTypeIs("text/css")
View Source
var IsHtml goproxy.RespCondition = goproxy.ContentTypeIs("text/html")
View Source
var IsJavaScript goproxy.RespCondition = goproxy.ContentTypeIs("text/javascript",
View Source
var IsJson goproxy.RespCondition = goproxy.ContentTypeIs("text/json")
View Source
var IsWebRelatedText goproxy.RespCondition = goproxy.ContentTypeIs("text/html",
	"text/javascript", "application/javascript",
View Source
var IsXml goproxy.RespCondition = goproxy.ContentTypeIs("text/xml")


func HandleString

func HandleString(f func(s string, ctx *goproxy.ProxyCtx) string) goproxy.RespHandler

HandleString will receive a function that filters a string, and will convert the request body to a utf8 string, according to the charset specified in the Content-Type header. guessing Html charset encoding from the <META> tags is not yet implemented.

func HandleStringReader

func HandleStringReader(f func(r io.Reader, ctx *goproxy.ProxyCtx) io.Reader) goproxy.RespHandler

Will receive an input stream which would convert the response to utf-8 The given function must close the reader r, in order to close the response body.


This section is empty.

Source Files

Jump to

Keyboard shortcuts

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