fix: unify backend port to 18080 and make validator targets configurable
- Set default API port to 18080 in config.py - Add configurable validation_targets to SettingsSchema and DEFAULT_SETTINGS - Update ValidatorService to support runtime test URL updates - Hot-reload validation_targets from DB on startup and on settings save - Add domestic fallback URLs (baidu.com, qq.com) to reduce foreign dependency risk - Update Settings.vue to allow adding/removing validator target URLs in UI
This commit is contained in:
@@ -47,6 +47,16 @@ class SettingsSchema(BaseModel):
|
||||
proxy_expiry_days: int = Field(default=7, ge=1, le=30)
|
||||
auto_validate: bool = True
|
||||
validate_interval_minutes: int = Field(default=30, ge=5, le=1440)
|
||||
validation_targets: List[str] = Field(
|
||||
default=[
|
||||
"http://httpbin.org/ip",
|
||||
"https://httpbin.org/ip",
|
||||
"http://api.ipify.org",
|
||||
"https://api.ipify.org",
|
||||
"http://www.baidu.com",
|
||||
"http://www.qq.com",
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
class CrawlResult(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user