Basic HTTP Auth (#163).

This commit is contained in:
jimafisk 2023-01-31 15:14:31 -05:00
parent 513e79832a
commit faeb8ae499
4 changed files with 125 additions and 4 deletions

View file

@ -78,6 +78,8 @@ func Serve(ctx *cli.Context) error {
challengeCache := cache.NewKeyValueCache()
// canonicalDomainCache stores canonical domains
canonicalDomainCache := cache.NewKeyValueCache()
// authCache stores basic HTTP Auth credentials
authCache := cache.NewKeyValueCache()
// dnsLookupCache stores DNS lookups for custom domains
dnsLookupCache := cache.NewKeyValueCache()
// clientResponseCache stores responses from the Gitea server
@ -93,7 +95,7 @@ func Serve(ctx *cli.Context) error {
giteaClient,
rawInfoPage,
BlacklistedPaths, allowedCorsDomains,
dnsLookupCache, canonicalDomainCache)
dnsLookupCache, canonicalDomainCache, authCache)
httpHandler := server.SetupHTTPACMEChallengeServer(challengeCache)