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:
Nelson Chan
2023-01-20 06:33:45 +08:00
parent ce82ad1c12
commit 95c934e08b
3 changed files with 20 additions and 4 deletions

View File

@@ -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) => {