Documentation
¶
Index ¶
- func LoadPoliciesOrDefault(fname string, defaultDifficulty int) (*policy.ParsedConfig, error)
- type Options
- type Server
- func (s *Server) CleanupDecayMap()
- func (s *Server) ClearCookie(w http.ResponseWriter, name, path string)
- func (s *Server) MakeChallenge(w http.ResponseWriter, r *http.Request)
- func (s *Server) PassChallenge(w http.ResponseWriter, r *http.Request)
- func (s *Server) RenderBench(w http.ResponseWriter, r *http.Request)
- func (s *Server) RenderIndex(w http.ResponseWriter, r *http.Request, rule *policy.Bot, ...)
- func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Server) ServeHTTPNext(w http.ResponseWriter, r *http.Request)
- func (s *Server) SetCookie(w http.ResponseWriter, name, value, path string)
- func (s *Server) TestError(w http.ResponseWriter, r *http.Request)
- type UnixRoundTripper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadPoliciesOrDefault ¶
func LoadPoliciesOrDefault(fname string, defaultDifficulty int) (*policy.ParsedConfig, error)
Types ¶
type Options ¶
type Options struct {
Next http.Handler
Policy *policy.ParsedConfig
Target string
CookieDomain string
CookieName string
BasePrefix string
WebmasterEmail string
RedirectDomains []string
PrivateKey ed25519.PrivateKey
CookieExpiration time.Duration
OGTimeToLive time.Duration
OGCacheConsidersHost bool
OGPassthrough bool
CookiePartitioned bool
ServeRobotsTXT bool
}
type Server ¶
type Server struct {
DNSBLCache *decaymap.Impl[string, dnsbl.DroneBLResponse]
OGTags *ogtags.OGTagCache
// contains filtered or unexported fields
}
func (*Server) CleanupDecayMap ¶ added in v1.16.0
func (s *Server) CleanupDecayMap()
func (*Server) ClearCookie ¶
func (s *Server) ClearCookie(w http.ResponseWriter, name, path string)
func (*Server) MakeChallenge ¶
func (s *Server) MakeChallenge(w http.ResponseWriter, r *http.Request)
func (*Server) PassChallenge ¶
func (s *Server) PassChallenge(w http.ResponseWriter, r *http.Request)
func (*Server) RenderBench ¶ added in v1.16.0
func (s *Server) RenderBench(w http.ResponseWriter, r *http.Request)
func (*Server) RenderIndex ¶
func (*Server) ServeHTTPNext ¶ added in v1.17.0
func (s *Server) ServeHTTPNext(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.