diff options
| author | Christine Dodrill <me@christine.website> | 2020-11-18 12:18:24 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-18 12:18:24 -0500 |
| commit | f643496416c75ea468ffd866ccfee6436a3912f0 (patch) | |
| tree | 902a3b987474906360544c55bd28b96f9e2bb44a /src/main.rs | |
| parent | 089b14788dbc0fe9a6b3a9263d5926a27c96f237 (diff) | |
| download | xesite-f643496416c75ea468ffd866ccfee6436a3912f0.tar.xz xesite-f643496416c75ea468ffd866ccfee6436a3912f0.zip | |
various updates (#263)
* various updates
* fix glory shot
* fix mi url for updating my blog
* fix CI
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs index 01333c9..0baaeef 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,12 +26,15 @@ async fn main() -> Result<()> { tracing_subscriber::fmt::init(); log::info!("starting up commit {}", env!("GITHUB_SHA")); - let state = Arc::new(app::init( - std::env::var("CONFIG_FNAME") - .unwrap_or("./config.dhall".into()) - .as_str() - .into(), - ).await?); + let state = Arc::new( + app::init( + std::env::var("CONFIG_FNAME") + .unwrap_or("./config.dhall".into()) + .as_str() + .into(), + ) + .await?, + ); let healthcheck = warp::get().and(warp::path(".within").and(warp::path("health")).map(|| "OK")); @@ -144,6 +147,17 @@ async fn main() -> Result<()> { ) }) .map(|reply| warp::reply::with_header(reply, "X-Clacks-Overhead", "GNU Ashlynn")) + .map(|reply| { + warp::reply::with_header( + reply, + "Link", + format!( + r#"<{}>; rel="webmention""#, + std::env::var("WEBMENTION_URL") + .unwrap_or("https://mi.within.website/api/webmention/accept".to_string()) + ), + ) + }) .with(warp::log(APPLICATION_NAME)) .recover(handlers::rejection); |
