Skip to content

Commit

Permalink
fix activity issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamed-abdelrhman committed Apr 21, 2024
1 parent 1cf4d30 commit 9b35ae1
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,19 +160,9 @@ func (crossover *Crossover) ServeHTTP(rw http.ResponseWriter, req *http.Request)
return
}

//clone request
clonedRequest, err := crossover.cloneRequest(req)
if err != nil {
rw.WriteHeader(http.StatusInternalServerError)
rw.Write([]byte(err.Error()))
return
}
//
//store user activity
//count request body
requestCount := crossover.requestCount(clonedRequest)
requestKey := crossover.requestKey(req.URL.Path)
crossover.activityService.LogActivity(requestKey, requestCount)
crossover.activityService.LogActivity(requestKey, 1)

//cache response
crossover.cacheService.ServeHTTP(rw, req, crossover.next, respClient)
Expand Down

0 comments on commit 9b35ae1

Please sign in to comment.