mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-21 13:40:27 +08:00
Fix: Do not allow white space around IP
Feat: Trim input on submit Test: Add test for whitespace regex match
This commit is contained in:
@@ -949,6 +949,14 @@ message HealthCheckResponse {
|
||||
this.monitor.headers = JSON.stringify(JSON.parse(this.monitor.headers), null, 4);
|
||||
}
|
||||
|
||||
if (this.monitor.hostname) {
|
||||
this.monitor.hostname = this.monitor.hostname.trim();
|
||||
}
|
||||
|
||||
if (this.monitor.url) {
|
||||
this.monitor.url = this.monitor.url.trim();
|
||||
}
|
||||
|
||||
if (this.isAdd) {
|
||||
this.$root.add(this.monitor, async (res) => {
|
||||
|
||||
|
Reference in New Issue
Block a user