-
Notifications
You must be signed in to change notification settings - Fork 1
API ‐ 设置API
lifegpc edited this page Aug 25, 2023
·
2 revisions
GET /api/config
参数名字 | 参数类型 | 可选 | 描述 |
---|---|---|---|
current |
boolean |
是 | 是否返回服务器目前正在使用的设置,默认为false (0 ) |
type |
"ws" | null |
是 | 设置为"ws" 来使用WebSocket通知客户端新的设置,默认为null ,仅当current 为true 时生效 |
POST /api/config
- Content-Type 应设置为
application/json
- 内容应为
Record<string, any>
, 例如:
{ "cookie": "New Cookie", "hostname": "0.0.0.0" }
- 返回示例
{"is_unsafe": false}
若is_unsafe
为true
,则更新的设置中包含需要下次启动才能生效的设置。