gway

Crates.iogway
lib.rsgway
version0.1.5
created_at2025-08-27 03:13:00.513763+00
updated_at2025-08-29 15:39:33.8534+00
descriptionproxy
homepagehttps://github.com/i18n-site/gway
repositoryhttps://github.com/i18n-site/gway.git
max_upload_size
id1812155
size256,376
i18n.site (i18nsite)

documentation

README

gway

mod cert;
mod cert_loader;
mod error;
mod proxy;
mod route;
pub mod shutdown;
pub mod srv;

#[cfg(feature = "cert_dir")]
pub use cert_loader::CertDir;
pub use cert_loader::{CertLoad, CertLoader};
pub use error::{Error, IntoError, Result};
pub use proxy::proxy;
pub use route::{Protocol, Route, SiteConf, Upstream};
pub use srv::srv;

pub fn req_host<B>(req: &hyper::Request<B>) -> &str {
  req
    .headers()
    .get("host")
    .map(|h| h.to_str().unwrap_or_default())
    .unwrap_or_else(|| req.uri().host().unwrap_or_default())
}
Commit count: 0

cargo fmt