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;
|
let mut want: Option<Post> = None;
|
||||||
|
|
||||||
for post in &state.blog {
|
for post in &state.blog {
|
||||||
log::debug!("{}", post.link);
|
|
||||||
if post.link == format!("blog/{}", name) {
|
if post.link == format!("blog/{}", name) {
|
||||||
want = Some(post.clone());
|
want = Some(post.clone());
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ fn with_state(
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<()> {
|
async fn main() -> Result<()> {
|
||||||
pretty_env_logger::init();
|
pretty_env_logger::init();
|
||||||
|
log::info!("starting up");
|
||||||
|
|
||||||
let state = Arc::new(app::init(
|
let state = Arc::new(app::init(
|
||||||
std::env::var("CONFIG_FNAME")
|
std::env::var("CONFIG_FNAME")
|
||||||
|
@ -92,6 +93,7 @@ async fn main() -> Result<()> {
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.or(healthcheck)
|
.or(healthcheck)
|
||||||
|
.map(|reply| warp::reply::with_header(reply, "X-Clacks-Overhead", "GNU Ashlynn"))
|
||||||
.with(warp::log(APPLICATION_NAME))
|
.with(warp::log(APPLICATION_NAME))
|
||||||
.recover(handlers::rejection);
|
.recover(handlers::rejection);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue