Documentation
¶
Index ¶
- Variables
- func EncodeBrotli(input []byte) ([]byte, error)
- func EncodeZstd(input []byte) ([]byte, error)
- func FileServerOptimized(fs fs.FS, notFoundHandler ...func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request)
- func GetFullURL(r *http.Request) url.URL
- func GetIPAddress(r *http.Request) string
- func HandleNotABotGif(onRequest func(r *http.Request)) func(w http.ResponseWriter, r *http.Request)
- func InCommaSeperated(commaSeparated string, needle string) bool
- func IsValidIPv6(address string) bool
- func NotABotDecode(query string) (notABot, error)
- func NotABotURLQuery(r *http.Request) string
- func PlausibleEventFromNotABot(incomingReq *http.Request) bool
- func ServeOptimized(w http.ResponseWriter, r *http.Request, filename string, modTime time.Time, ...)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // go tool air proxy wont work if encoding DisableContentEncodingForHTML = false ReportWarnings = false )
View Source
var ( PlausibleDebug bool PlausibleDomain string PlausibleBaseURL string )
Functions ¶
func EncodeBrotli ¶
func EncodeZstd ¶
func FileServerOptimized ¶
func FileServerOptimized( fs fs.FS, notFoundHandler ...func(http.ResponseWriter, *http.Request), ) func(http.ResponseWriter, *http.Request)
example usage: `http.HandleFunc("GET /{file...}", foxhttp.FileServerOptimized(publicFS))`
func GetIPAddress ¶
func HandleNotABotGif ¶
func HandleNotABotGif( onRequest func(r *http.Request), ) func(w http.ResponseWriter, r *http.Request)
use with `http.HandleFunc("GET /notabot.gif", foxhttp.HandleNotABotGif(...))`
func InCommaSeperated ¶
func IsValidIPv6 ¶
func NotABotDecode ¶
func NotABotURLQuery ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.