From 56fb2cb76f628bf2bbd5f35a3ec612331380ba36 Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Wed, 9 Oct 2024 08:40:03 +0200 Subject: dashboard/app: don't limit requests for the authenticated users --- dashboard/app/handler.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'dashboard/app') diff --git a/dashboard/app/handler.go b/dashboard/app/handler.go index 91c051e2b..265de910c 100644 --- a/dashboard/app/handler.go +++ b/dashboard/app/handler.go @@ -33,10 +33,12 @@ func handleContext(fn contextHandler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { c := appengine.NewContext(r) c = context.WithValue(c, ¤tURLKey, r.URL.RequestURI()) - if !throttleRequest(c, w, r) { - return + if accessLevel(c, r) == AccessPublic { + if !throttleRequest(c, w, r) { + return + } + defer backpressureRobots(c, r)() } - defer backpressureRobots(c, r)() if err := fn(c, w, r); err != nil { hdr := commonHeaderRaw(c, r) data := &struct { -- cgit mrf-deployment