Documentation
¶
Index ¶
- Variables
- func LoadPoliciesOrDefault(ctx context.Context, fname string, defaultDifficulty int, logLevel string) (*policy.ParsedConfig, error)
- type CookieOpts
- type Options
- type Server
- func (s *Server) ClearCookie(w http.ResponseWriter, cookieOpts CookieOpts)
- 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, cr policy.CheckResult, ...)
- 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, cookieOpts CookieOpts)
- type UnixRoundTripper
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrActualAnubisBug = errors.New("this is an actual bug in Anubis, please file an issue with the magic string 'taco bell'")
)
Functions ¶
func LoadPoliciesOrDefault ¶
Types ¶
type CookieOpts ¶ added in v1.21.0
type Options ¶
type Options struct {
Next http.Handler
Policy *policy.ParsedConfig
Target string
TargetHost string
TargetSNI string
TargetInsecureSkipVerify bool
CookieDynamicDomain bool
CookieDomain string
CookieExpiration time.Duration
CookiePartitioned bool
BasePrefix string
WebmasterEmail string
RedirectDomains []string
ED25519PrivateKey ed25519.PrivateKey
HS512Secret []byte
StripBasePrefix bool
OpenGraph config.OpenGraph
ServeRobotsTXT bool
CookieSecure bool
CookieSameSite http.SameSite
Logger *slog.Logger
LogLevel string
PublicUrl string
JWTRestrictionHeader string
DifficultyInJWT bool
}
type Server ¶
type Server struct {
OGTags *ogtags.OGTagCache
// contains filtered or unexported fields
}
func (*Server) ClearCookie ¶
func (s *Server) ClearCookie(w http.ResponseWriter, cookieOpts CookieOpts)
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 (s *Server) RenderIndex(w http.ResponseWriter, r *http.Request, cr policy.CheckResult, rule *policy.Bot, returnHTTPStatusOnly bool)
func (*Server) ServeHTTPNext ¶ added in v1.17.0
func (s *Server) ServeHTTPNext(w http.ResponseWriter, r *http.Request)
func (*Server) SetCookie ¶ added in v1.19.0
func (s *Server) SetCookie(w http.ResponseWriter, cookieOpts CookieOpts)
Directories
¶
| Path | Synopsis |
|---|---|
|
metarefresh
templ: version: v0.3.960
|
templ: version: v0.3.960 |
|
preact
templ: version: v0.3.960
|
templ: version: v0.3.960 |
|
proofofwork
templ: version: v0.3.960
|
templ: version: v0.3.960 |
|
checker
Package checker defines the Checker interface and a helper utility to avoid import cycles.
|
Package checker defines the Checker interface and a helper utility to avoid import cycles. |
|
all
Package all is a meta-package that imports all store implementations.
|
Package all is a meta-package that imports all store implementations. |
Click to show internal directories.
Click to hide internal directories.