v0.35.1: performance, AGPL licensing and documentation overhaul
- Web Server reads static files inline; proxy middleware chain flattened - About window with license summary and project links; AGPL-3.0-or-later - Rewritten documentation: feature list, screenshots, performance guide - Fix false spikes in per-Vhost request-rate charts
This commit is contained in:
1 parent
d3b492874b
commit
eba9f89283
135 files changed
+1425
-1064
No files matched your search
@@ -35,17 +35,20 @@ async fn execute(
|
||||
.map_err(|_| "acme.validation_worker_failed".to_owned())?
|
||||
}
|
||||
|
||||
pub async fn challenge(
|
||||
axum::extract::State(state): axum::extract::State<Arc<App>>,
|
||||
request: axum::extract::Request,
|
||||
next: axum::middleware::Next,
|
||||
) -> axum::response::Response {
|
||||
const CHALLENGE_PREFIX: &str = "/.well-known/acme-challenge/";
|
||||
|
||||
pub fn is_challenge_path(path: &str) -> bool {
|
||||
path.starts_with(CHALLENGE_PREFIX)
|
||||
}
|
||||
|
||||
pub async fn challenge(state: Arc<App>, request: axum::extract::Request) -> axum::response::Response {
|
||||
use axum::{body::Body, response::IntoResponse};
|
||||
use tokio::io::AsyncReadExt;
|
||||
const PREFIX: &str = "/.well-known/acme-challenge/";
|
||||
let Some(token) = request.uri().path().strip_prefix(PREFIX) else {
|
||||
return next.run(request).await;
|
||||
};
|
||||
let token = request
|
||||
.uri()
|
||||
.path()
|
||||
.strip_prefix(CHALLENGE_PREFIX)
|
||||
.unwrap_or_default();
|
||||
let denied = || {
|
||||
(
|
||||
StatusCode::NOT_FOUND,
|
||||
|
||||
Reference in new issue
Block a user