create & attach an AdHoc Fairing for dealing with Custom Domains
this rewrites the URL to /custom_domain/<url>
(we have no route handlers for this path yet)
Lots of help from @fdb-hiroshima & @BaptisteGelez in dealing with the
borrow checker — thank you 💜️
This commit is contained in:
@@ -25,6 +25,7 @@ use posts::Post;
|
||||
use safe_string::SafeString;
|
||||
use schema::blogs;
|
||||
use search::Searcher;
|
||||
use std::fmt::{self, Display};
|
||||
use users::User;
|
||||
use {Connection, Error, PlumeRocket, Result};
|
||||
|
||||
@@ -39,6 +40,12 @@ impl Host {
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for Host {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{}", self.0)
|
||||
}
|
||||
}
|
||||
|
||||
impl AsRef<str> for Host {
|
||||
fn as_ref(&self) -> &str {
|
||||
&self.0
|
||||
|
||||
Reference in New Issue
Block a user