Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
route GETs to the legacy endpoint too (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
xvello authored Nov 20, 2023
1 parent 0b1b0a2 commit 3e70e71
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions capture/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 3e70e71

Please sign in to comment.