Add administrator-controlled IP project entry redirects
Verify control plane / verify (push) Canceled after 0s
Verify control plane / verify (pull_request) Canceled after 0s

This commit is contained in:
WebUp Cloud committed 2026-11-08 12:25:01 +08:00
1 parent 1f25bbd1f9
commit 2f93fb023a
13 files changed
+439 -5

No files matched your search

@@ -161,6 +161,7 @@ public class AdminController {
Map.entry("mainDomain", 253),
Map.entry("deploymentDomain", 253),
Map.entry("domainDeliveryTarget", 253),
Map.entry("ipEntryOrigin", 100),
Map.entry("domainTemplate", 300),
Map.entry("filing", 100),
Map.entry("footer", 500),
@@ -190,18 +191,22 @@ public class AdminController {
&& !e.getValue().isEmpty()
&& !e.getValue().matches("https://[^\\s]+|/brand/[A-Za-z0-9_.-]+"))
throw new ApiError.Failure(400, "Logo 需要 HTTPS 地址");
String value =
e.getKey().equals("ipEntryOrigin")
? IpEntryService.validateOrigin(e.getValue())
: e.getValue();
users
.db()
.update(
"UPDATE system_settings SET setting_value=?,updated_at=CURRENT_TIMESTAMP WHERE"
+ " setting_key=?",
e.getValue(),
value,
e.getKey());
audit(
actor.id(),
"SETTING_UPDATE",
e.getKey(),
"旧值: " + before.get(e.getKey()) + "; 新值: " + e.getValue(),
"旧值: " + before.get(e.getKey()) + "; 新值: " + value,
AuthController.ip(req));
}
return readSettings();