This commit is contained in:
Nathan Sobo 2022-04-25 20:21:43 -06:00
parent 3938f7c364
commit be040b60b7
3 changed files with 13 additions and 20 deletions

View file

@ -28,6 +28,7 @@ pub fn routes(state: Arc<AppState>) -> Router<Body> {
.layer(Extension(state))
.layer(middleware::from_fn(validate_api_token)),
)
// TODO: Compression on API routes?
}
pub async fn validate_api_token<B>(req: Request<B>, next: Next<B>) -> impl IntoResponse {