Weighs the soul of incoming HTTP requests to stop AI crawlers
1// Package anubis contains the version number of Anubis.
2package anubis
3
4import "time"
5
6// Version is the current version of Anubis.
7//
8// This variable is set at build time using the -X linker flag. If not set,
9// it defaults to "devel".
10var Version = "devel"
11
12// CookieName is the name of the cookie that Anubis uses in order to validate
13// access.
14var CookieName = "techaro.lol-anubis-auth"
15
16// TestCookieName is the name of the cookie that Anubis uses in order to check
17// if cookies are enabled on the client's browser.
18var TestCookieName = "techaro.lol-anubis-cookie-verification"
19
20// CookieDefaultExpirationTime is the amount of time before the cookie/JWT expires.
21const CookieDefaultExpirationTime = 7 * 24 * time.Hour
22
23// BasePrefix is a global prefix for all Anubis endpoints. Can be emptied to remove the prefix entirely.
24var BasePrefix = ""
25
26// StaticPath is the location where all static Anubis assets are located.
27const StaticPath = "/.within.website/x/cmd/anubis/"
28
29// APIPrefix is the location where all Anubis API endpoints are located.
30const APIPrefix = "/.within.website/x/cmd/anubis/api/"
31
32// DefaultDifficulty is the default "difficulty" (number of leading zeroes)
33// that must be met by the client in order to pass the challenge.
34const DefaultDifficulty = 4
35
36// ForcedLanguage is the language being used instead of the one of the request's Accept-Language header
37// if being set.
38var ForcedLanguage = ""