fix(edit-monitor): fix regex to allow a single header

This commit is contained in:
Bert Verhelst 2021-10-09 11:20:33 +02:00
parent daab2a05f5
commit c3c273f9df

View File

@ -442,7 +442,7 @@ export default {
}
}
if (this.monitor.headers) {
if (!/^([^:]+:.*)([\s]+[^:]+:.*)+$/g.test(this.monitor.headers)) {
if (!/^([^:]+:.*)([\s]+[^:]+:.*)*$/g.test(this.monitor.headers)) {
toast.error(this.$t("HeadersInvalidFormat"));
return false;
}