Refactor regex pattern for server name validation

This commit is contained in:
Théophile Diot 2024-01-30 17:20:17 +01:00
parent 7154d1f3a1
commit bf9a4e291b
No known key found for this signature in database
GPG key ID: 248FEA4BAE400D06

View file

@ -50,7 +50,7 @@
"help": "List of the virtual hosts served by bunkerweb.",
"id": "server-name",
"label": "Server name",
"regex": "^(?! )( ?((?=[^ ]{1,255}( |$))[^ ]+)(?!.* \\2))*$",
"regex": "^((\\S{1,255})(?!.*\\s\\2(\\s|$)))?(\\s(\\S{1,255})(?!.*\\s\\5(\\s|$)))*$",
"type": "text"
},
"WORKER_PROCESSES": {