// 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 determine a virtual hostname.//!use HeaderMap;use HOST;use PathBuf;use crateVirtualHosts;/// It returns different root directory if the "Host" header matches a virtual hostname.headers: &HeaderMap,vhosts_opts: ,if let Some = vhosts_optsif let Ok = headers.get?.to_strfor vhost in vhostsif vhost.host == host_strreturn Some;None