From 3e70e7106b10e6eff94c842e0f4f3ba0dde1034f Mon Sep 17 00:00:00 2001 From: Xavier Vello Date: Mon, 20 Nov 2023 12:54:03 +0100 Subject: [PATCH] route GETs to the legacy endpoint too (#53) --- capture/src/router.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/capture/src/router.rs b/capture/src/router.rs index bae787c..6f2f044 100644 --- a/capture/src/router.rs +++ b/capture/src/router.rs @@ -58,8 +58,18 @@ pub fn router< .route("/", get(index)) .route("/_readiness", get(index)) .route("/_liveness", get(move || ready(liveness.get_status()))) - .route("/i/v0/e", post(capture::event).options(capture::options)) - .route("/i/v0/e/", post(capture::event).options(capture::options)) + .route( + "/i/v0/e", + post(capture::event) + .get(capture::event) + .options(capture::options), + ) + .route( + "/i/v0/e/", + post(capture::event) + .get(capture::event) + .options(capture::options), + ) .layer(TraceLayer::new_for_http()) .layer(cors) .layer(axum::middleware::from_fn(track_metrics))