X-Clacks-Overhead
This commit is contained in:
parent
611baba0ce
commit
67ff58b47a
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue