// SPDX-License-Identifier: MIT OR Apache-2.0// This file is part of Static Web Server.// See https://static-web-server.net/ for more information// Copyright (C) 2019-present Jose Quintana <joseluisq.net>//! Module that allows to rewrite request URLs with pattern matching support.//!use ;use PathBuf;use crateVirtualHosts;/// It returns different root dir if the "Host" header matches a virtual hostname.vhosts_vec: &'a ,headers: &HeaderMap,if let Some = vhosts_vecif let Ok = headers.get?.to_strfor vhost in vhostsif vhost.host == host_strreturn Some;None