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)
- 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) 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
RedirectDomains []string
ServeRobotsTXT bool
PrivateKey ed25519.PrivateKey
CookieExpiration time.Duration
CookieDomain string
CookieName string
CookiePartitioned bool
OGPassthrough bool
OGTimeToLive time.Duration
OGCacheConsidersHost bool
Target string
WebmasterEmail string
BasePrefix string
}
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)
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.