2024-02-15 16:08:29 +00:00
|
|
|
package config
|
|
|
|
|
|
|
|
type Config struct {
|
|
|
|
LogLevel string `default:"warn"`
|
|
|
|
Server ServerConfig
|
2024-05-26 14:45:03 +00:00
|
|
|
Forge ForgeConfig
|
2024-02-15 16:08:29 +00:00
|
|
|
Database DatabaseConfig
|
|
|
|
ACME ACMEConfig
|
|
|
|
}
|
|
|
|
|
|
|
|
type ServerConfig struct {
|
|
|
|
Host string `default:"[::]"`
|
|
|
|
Port uint16 `default:"443"`
|
|
|
|
HttpPort uint16 `default:"80"`
|
|
|
|
HttpServerEnabled bool `default:"true"`
|
|
|
|
MainDomain string
|
|
|
|
RawDomain string
|
|
|
|
PagesBranches []string
|
|
|
|
AllowedCorsDomains []string
|
|
|
|
BlacklistedPaths []string
|
|
|
|
}
|
|
|
|
|
2024-05-26 14:45:03 +00:00
|
|
|
type ForgeConfig struct {
|
2024-02-15 16:08:29 +00:00
|
|
|
Root string
|
|
|
|
Token string
|
|
|
|
LFSEnabled bool `default:"false"`
|
|
|
|
FollowSymlinks bool `default:"false"`
|
|
|
|
DefaultMimeType string `default:"application/octet-stream"`
|
|
|
|
ForbiddenMimeTypes []string
|
|
|
|
}
|
|
|
|
|
|
|
|
type DatabaseConfig struct {
|
|
|
|
Type string `default:"sqlite3"`
|
|
|
|
Conn string `default:"certs.sqlite"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type ACMEConfig struct {
|
|
|
|
Email string
|
|
|
|
APIEndpoint string `default:"https://acme-v02.api.letsencrypt.org/directory"`
|
|
|
|
AcceptTerms bool `default:"false"`
|
|
|
|
UseRateLimits bool `default:"true"`
|
|
|
|
EAB_HMAC string
|
|
|
|
EAB_KID string
|
|
|
|
DNSProvider string
|
2024-04-18 17:05:20 +00:00
|
|
|
NoDNS01 bool `default:"false"`
|
2024-02-15 16:08:29 +00:00
|
|
|
AccountConfigFile string `default:"acme-account.json"`
|
|
|
|
}
|