mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-11-23 06:18:59 +00:00
bb7cfbb37c
This can be useful when the pages-server is running behing a proxy, to keep track of the originating ip. Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/394 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Julien Malka <julien@malka.sh> Co-committed-by: Julien Malka <julien@malka.sh>
49 lines
1.3 KiB
Go
49 lines
1.3 KiB
Go
package config
|
|
|
|
type Config struct {
|
|
LogLevel string `default:"warn"`
|
|
Server ServerConfig
|
|
Forge ForgeConfig
|
|
Database DatabaseConfig
|
|
ACME ACMEConfig
|
|
}
|
|
|
|
type ServerConfig struct {
|
|
Host string `default:"[::]"`
|
|
Port uint16 `default:"443"`
|
|
HttpPort uint16 `default:"80"`
|
|
HttpServerEnabled bool `default:"true"`
|
|
UseProxyProtocol bool `default:"false"`
|
|
MainDomain string
|
|
RawDomain string
|
|
PagesBranches []string
|
|
AllowedCorsDomains []string
|
|
BlacklistedPaths []string
|
|
}
|
|
|
|
type ForgeConfig struct {
|
|
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
|
|
NoDNS01 bool `default:"false"`
|
|
AccountConfigFile string `default:"acme-account.json"`
|
|
}
|