This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use rocket::{request::FromRequest, Outcome, Request}; | |
pub struct WWWHost; | |
pub struct AAAHost; | |
impl<'a, 'r> FromRequest<'a, 'r> for WWWHost { | |
type Error = (); | |
fn from_request(request: &'a Request<'r>) -> rocket::request::Outcome<Self, Self::Error> { | |
if let Some(hostname) = request.headers().get_one("host") { |