client/backup_repo: allow ip addresses for BackupRepository

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2019-02-28 15:10:47 +01:00
parent 5de2bced2d
commit df67070b1c
1 changed files with 2 additions and 1 deletions

View File

@ -8,7 +8,8 @@ use regex::Regex;
lazy_static! {
/// Regular expression to parse repository URLs
pub static ref BACKUP_REPO_URL_REGEX: Regex = Regex::new(r"^(?:(?:([\w@]+)@)?(\w+):)?(\w+)$").unwrap();
pub static ref BACKUP_REPO_URL_REGEX: Regex =
Regex::new(r"^(?:(?:([\w@]+)@)?([\w\-_.]+):)?(\w+)$").unwrap();
/// API schema format definition for repository URLs
pub static ref BACKUP_REPO_URL: Arc<ApiStringFormat> =