Add files via upload

This commit is contained in:
公明
2026-07-14 11:52:27 +08:00
committed by GitHub
parent 1be10cdf2c
commit 7d1e16b97b
3 changed files with 129 additions and 7 deletions
+3
View File
@@ -767,6 +767,9 @@ func (c RobotsConfig) ServiceAccountUserIDs() map[string]string {
type ServerConfig struct {
Host string `yaml:"host" json:"host"`
Port int `yaml:"port" json:"port"`
// CORSAllowedOrigins contains additional, exact origins that may call the API.
// Same-origin browser requests are always allowed. Wildcards are intentionally unsupported.
CORSAllowedOrigins []string `yaml:"cors_allowed_origins,omitempty" json:"cors_allowed_origins,omitempty"`
// TLSEnabled 为 true 时主 Web UI 使用 HTTPS;现代浏览器在同源下会协商 HTTP/2,缓解 HTTP/1.1 每源并发连接数限制。
TLSEnabled bool `yaml:"tls_enabled,omitempty" json:"tls_enabled,omitempty"`
// TLSCertPath / TLSKeyPath 非空时从 PEM 文件加载证书(生产环境推荐)。