mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-25 06:16:58 +00:00
use new config structs for passing config down
This commit is contained in:
parent
fdbbc17cca
commit
81e980ce13
8 changed files with 110 additions and 145 deletions
|
@ -15,15 +15,18 @@ type ServerConfig struct {
|
|||
HttpServerEnabled bool
|
||||
MainDomain string
|
||||
RawDomain string
|
||||
DefaultBranches []string
|
||||
AllowedCorsDomains []string
|
||||
BlacklistedPaths []string
|
||||
}
|
||||
|
||||
type GiteaConfig struct {
|
||||
Root string
|
||||
Token string
|
||||
LFSEnabled bool
|
||||
FollowSymlinks bool
|
||||
Root string
|
||||
Token string
|
||||
LFSEnabled bool
|
||||
FollowSymlinks bool
|
||||
DefaultMimeType string
|
||||
ForbiddenMimeTypes []string
|
||||
}
|
||||
|
||||
type DatabaseConfig struct {
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"codeberg.org/codeberg/pages/server/cache"
|
||||
"codeberg.org/codeberg/pages/server/certificates"
|
||||
"codeberg.org/codeberg/pages/server/database"
|
||||
"codeberg.org/codeberg/pages/server/gitea"
|
||||
)
|
||||
|
||||
type HandlerConfig struct {
|
||||
mainDomainSuffix string
|
||||
rawDomain string
|
||||
giteaClient *gitea.Client
|
||||
blacklistedPaths []string
|
||||
allowedCorsDomains []string
|
||||
defaultBranches []string
|
||||
dnsLookupCache cache.ICache
|
||||
canonicalDomainCache cache.ICache
|
||||
redirectsCache cache.ICache
|
||||
}
|
||||
|
||||
type TLSConfig struct {
|
||||
mainDomainSuffix string
|
||||
firstDefaultBranch string
|
||||
giteaClient *gitea.Client
|
||||
acmeClient *certificates.AcmeClient
|
||||
keyCache cache.ICache
|
||||
challengeCache cache.ICache
|
||||
dnsLookupCache cache.ICache
|
||||
canonicalDomainCache cache.ICache
|
||||
certDB database.CertDB
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue