aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/app
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2024-10-09 08:40:03 +0200
committerTaras Madan <tarasmadan@google.com>2024-10-09 08:39:20 +0000
commit56fb2cb76f628bf2bbd5f35a3ec612331380ba36 (patch)
tree2b146ec390688491f46d2d7797afc7bf1fb35e45 /dashboard/app
parent402f1df054ddb07ed5bb299d08c781354eb06607 (diff)
dashboard/app: don't limit requests for the authenticated users
Diffstat (limited to 'dashboard/app')
-rw-r--r--dashboard/app/handler.go8
1 files changed, 5 insertions, 3 deletions
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, &currentURLKey, 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 {