Skip to content

Commit db014cf

Browse files
committed
Fix
1 parent 8559d29 commit db014cf

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

server/src/handlers/http.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,11 @@ pub fn configure_routes(cfg: &mut web::ServiceConfig) {
144144
.authorise_for_stream(Action::CreateStream),
145145
)
146146
// POST "/logstream/{logstream}" ==> Post logs to given log stream
147-
.route(web::post().to(ingest::post_event).authorise(Action::Ingest))
147+
.route(
148+
web::post()
149+
.to(ingest::post_event)
150+
.authorise_for_stream(Action::Ingest),
151+
)
148152
// DELETE "/logstream/{logstream}" ==> Delete log stream
149153
.route(
150154
web::delete()
@@ -249,7 +253,11 @@ pub fn configure_routes(cfg: &mut web::ServiceConfig) {
249253
// POST "/ingest" ==> Post logs to given log stream based on header
250254
.service(
251255
web::resource("/ingest")
252-
.route(web::post().to(ingest::ingest).authorise(Action::Ingest))
256+
.route(
257+
web::post()
258+
.to(ingest::ingest)
259+
.authorise_for_stream(Action::Ingest),
260+
)
253261
.app_data(web::PayloadConfig::default().limit(MAX_EVENT_PAYLOAD_SIZE)),
254262
)
255263
// GET "/liveness" ==> Liveness check as per https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command

0 commit comments

Comments
 (0)