X-Clacks-Overhead

This commit is contained in:
Cadey Ratio 2020-07-13 08:01:33 -04:00
parent 611baba0ce
commit 67ff58b47a
2 changed files with 2 additions and 1 deletions

View File

@ -81,7 +81,6 @@ pub async fn blog_post_view(name: String, state: Arc<State>) -> Result<impl Repl
let mut want: Option<Post> = None;
for post in &state.blog {
log::debug!("{}", post.link);
if post.link == format!("blog/{}", name) {
want = Some(post.clone());
}

View File

@ -20,6 +20,7 @@ fn with_state(
#[tokio::main]
async fn main() -> Result<()> {
pretty_env_logger::init();
log::info!("starting up");
let state = Arc::new(app::init(
std::env::var("CONFIG_FNAME")
@ -92,6 +93,7 @@ async fn main() -> Result<()> {
)
})
.or(healthcheck)
.map(|reply| warp::reply::with_header(reply, "X-Clacks-Overhead", "GNU Ashlynn"))
.with(warp::log(APPLICATION_NAME))
.recover(handlers::rejection);