Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ServerAddress = "http://localhost:3000"
View Source
var WorkerAllowHttpImageRequestEnabled = false
View Source
var WorkerUrl = ""
View Source
var WorkerValidKey = ""
Functions ¶
func EnableWorker ¶
func EnableWorker() bool
Types ¶
type DiscordSettings ¶
type DiscordSettings struct {
Enabled bool `json:"enabled"`
ClientId string `json:"client_id"`
ClientSecret string `json:"client_secret"`
}
func GetDiscordSettings ¶
func GetDiscordSettings() *DiscordSettings
type FetchSetting ¶
type FetchSetting struct {
EnableSSRFProtection bool `json:"enable_ssrf_protection"` // 是否启用SSRF防护
AllowPrivateIp bool `json:"allow_private_ip"`
DomainFilterMode bool `json:"domain_filter_mode"` // 域名过滤模式,true: 白名单模式,false: 黑名单模式
IpFilterMode bool `json:"ip_filter_mode"` // IP过滤模式,true: 白名单模式,false: 黑名单模式
DomainList []string `json:"domain_list"` // domain format, e.g. example.com, *.example.com
IpList []string `json:"ip_list"` // CIDR format
AllowedPorts []string `json:"allowed_ports"` // port range format, e.g. 80, 443, 8000-9000
ApplyIPFilterForDomain bool `json:"apply_ip_filter_for_domain"` // 对域名启用IP过滤(实验性)
}
func GetFetchSetting ¶
func GetFetchSetting() *FetchSetting
type LegalSettings ¶
type LegalSettings struct {
UserAgreement string `json:"user_agreement"`
PrivacyPolicy string `json:"privacy_policy"`
}
func GetLegalSettings ¶
func GetLegalSettings() *LegalSettings
type OIDCSettings ¶
type OIDCSettings struct {
Enabled bool `json:"enabled"`
DisplayName string `json:"display_name"`
ClientId string `json:"client_id"`
ClientSecret string `json:"client_secret"`
WellKnown string `json:"well_known"`
AuthorizationEndpoint string `json:"authorization_endpoint"`
TokenEndpoint string `json:"token_endpoint"`
UserInfoEndpoint string `json:"user_info_endpoint"`
}
func GetOIDCSettings ¶
func GetOIDCSettings() *OIDCSettings
func (*OIDCSettings) GetEffectiveDisplayName ¶
func (s *OIDCSettings) GetEffectiveDisplayName() string
GetEffectiveDisplayName returns the admin-configured display name, or the literal "OIDC" when none has been set. Centralizing this fallback keeps the default in one place for both the OAuth provider name and the public status payload.
type PasskeySettings ¶
type PasskeySettings struct {
Enabled bool `json:"enabled"`
RPDisplayName string `json:"rp_display_name"`
RPID string `json:"rp_id"`
Origins string `json:"origins"`
AllowInsecureOrigin bool `json:"allow_insecure_origin"`
UserVerification string `json:"user_verification"`
AttachmentPreference string `json:"attachment_preference"`
}
func GetPasskeySettings ¶
func GetPasskeySettings() *PasskeySettings
Click to show internal directories.
Click to hide internal directories.