anubis.go 1.6 KB

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