motiv-labs / janus

An API Gateway written in Go
https://hellofresh.gitbooks.io/janus
MIT License
2.78k stars 318 forks source link

PT-4110 Fix rate limiting plugin #398

Closed spetrashov closed 5 years ago

spetrashov commented 5 years ago

What does this PR do?

This PR fixes the rate-limiting plugin in Janus. Now it will use X-Forwarded-For and X-Real-IP HTTP headers to fetch IP for rate-limiting.

vgarvardt commented 5 years ago

👍

Approved with Zappr Approved with Zappr Approved with Zappr

codecov[bot] commented 5 years ago

Codecov Report

Merging #398 into master will not change coverage. The diff coverage is 50%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #398   +/-   ##
=======================================
  Coverage   40.37%   40.37%           
=======================================
  Files          75       75           
  Lines        2635     2635           
=======================================
  Hits         1064     1064           
  Misses       1509     1509           
  Partials       62       62
Impacted Files Coverage Δ
pkg/plugin/rate/rate_limit_logger.go 56% <0%> (ø) :arrow_up:
pkg/plugin/rate/setup.go 51.92% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 98b9f36...081b0e7. Read the comment docs.

bghellofresh commented 5 years ago

+1

Approved with Zappr Approved with Zappr Approved with Zappr

fftorres commented 5 years ago

+1

Approved with Zappr Approved with Zappr Approved with Zappr Approved with Zappr