diff options
Diffstat (limited to 'config/varnish64/varnish.inc')
-rw-r--r-- | config/varnish64/varnish.inc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/config/varnish64/varnish.inc b/config/varnish64/varnish.inc index 735152f7..295533b9 100644 --- a/config/varnish64/varnish.inc +++ b/config/varnish64/varnish.inc @@ -31,8 +31,15 @@ */ /* ========================================================================== */ +function varnish_lb_directors_post_validate($post, $input_errors) { + if (preg_match("/[^a-zA-Z0-9]/", $post['directorname'])) + $input_errors[] = "The directorname name must only contain the characters a-Z or 0-9"; + if(stristr($post['directorurl'], 'http')) + $input_errors[] = "You do not need to include the http:// string in the director URL"; +} + function varnish_backends_post_validate($post, $input_errors) { - if (preg_match("/[^a-zA-Z0-9\.\-_]/", $post['backendname'])) + if (preg_match("/[^a-zA-Z0-9]/", $post['backendname'])) $input_errors[] = "The backend name must only contain the characters a-Z or 0-9"; if(!is_ipaddr($post['ipaddress'])) $input_errors[] = "A valid IP address is required for the field 'IPAddress'"; |