feat: 统一 Commilitia Drop 全客户端命名与分发
This commit is contained in:
@@ -44,7 +44,7 @@ type Config struct {
|
||||
// 内网直连(绝不经公网反代,以保 /internal/* 与 /refresh 可达)。
|
||||
// BrokerInternalKey —— broker /internal/* 端点的共享密钥(作 X-Internal-Key 发送),
|
||||
// prod 必填。
|
||||
// BrokerApp —— 本应用在 broker apps 注册表里的 key(默认 "cdrop")。
|
||||
// BrokerApp —— 本应用在 broker apps 注册表里的 key(默认 "commilitia-drop")。
|
||||
BrokerBaseURL string `koanf:"broker_base_url"`
|
||||
BrokerInternalKey string `koanf:"broker_internal_key"`
|
||||
BrokerApp string `koanf:"broker_app"`
|
||||
@@ -96,7 +96,7 @@ type Config struct {
|
||||
// APNSKeyPath — filesystem path to the .p8 (PEM PKCS8 ES256) key Apple issues.
|
||||
// APNSKeyID — the 10-character Key ID from the Apple Developer portal.
|
||||
// APNSTeamID — the 10-character Team ID from the Apple Developer portal.
|
||||
// APNSTopic — the app bundle ID (e.g. "net.commilitia.cdrop").
|
||||
// APNSTopic — the app bundle ID (e.g. "net.commilitia.Commilitia-Drop").
|
||||
// APNSEnv — "prod" (default) or "sandbox" (dev/TestFlight builds).
|
||||
// When unset, APNs is disabled and the register endpoint returns 503.
|
||||
APNSKeyPath string `koanf:"apns_key_path"`
|
||||
@@ -123,12 +123,12 @@ func (c *Config) QRLoginOn() bool {
|
||||
return c.QRLoginEnabled && c.BrokerBaseURL != ""
|
||||
}
|
||||
|
||||
// BrokerAppOrDefault returns the configured broker app key, defaulting to "cdrop".
|
||||
// BrokerAppOrDefault returns the configured broker app key, defaulting to "commilitia-drop".
|
||||
func (c *Config) BrokerAppOrDefault() string {
|
||||
if c.BrokerApp != "" {
|
||||
return c.BrokerApp
|
||||
}
|
||||
return "cdrop"
|
||||
return "commilitia-drop"
|
||||
}
|
||||
|
||||
// Load reads config from optional ./config.yaml then overrides with CDROP_* env.
|
||||
@@ -144,7 +144,7 @@ func Load() (*Config, error) {
|
||||
k.Set("clipboard_debounce_sec", 3)
|
||||
k.Set("qr_login_enabled", true)
|
||||
k.Set("qr_request_ttl_seconds", 120)
|
||||
k.Set("broker_app", "cdrop")
|
||||
k.Set("broker_app", "commilitia-drop")
|
||||
k.Set("full_access_ttl_seconds", 900)
|
||||
k.Set("full_refresh_ttl_seconds", 604800)
|
||||
k.Set("guest_access_ttl_seconds", 900)
|
||||
|
||||
Reference in New Issue
Block a user