Documentation ¶
Overview ¶
extension to gopensslproxy that will allow you to easily filter web browser related content.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var IsCss gopensslproxy.RespCondition = gopensslproxy.ContentTypeIs("text/css")
View Source
var IsHtml gopensslproxy.RespCondition = gopensslproxy.ContentTypeIs("text/html")
View Source
var IsJavaScript gopensslproxy.RespCondition = gopensslproxy.ContentTypeIs("text/javascript",
"application/javascript")
View Source
var IsJson gopensslproxy.RespCondition = gopensslproxy.ContentTypeIs("text/json")
View Source
var IsWebRelatedText gopensslproxy.RespCondition = gopensslproxy.ContentTypeIs("text/html",
"text/css",
"text/javascript", "application/javascript",
"text/xml",
"text/json")
View Source
var IsXml gopensslproxy.RespCondition = gopensslproxy.ContentTypeIs("text/xml")
Functions ¶
func HandleString ¶
func HandleString(f func(s string, ctx *gopensslproxy.ProxyCtx) string) gopensslproxy.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 *gopensslproxy.ProxyCtx) io.Reader) gopensslproxy.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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.