• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / auth / 20069619121
69%

Build:
DEFAULT BRANCH: master
Ran 09 Dec 2025 03:58PM UTC
Jobs 1
Files 170
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Dec 2025 03:50PM UTC coverage: 68.471% (+0.02%) from 68.451%
20069619121

push

github

web-flow
feat: Treat rate limit header value as comma-separated list (#2282)

## What kind of change does this PR introduce?

This PR updates `performRateLimiting` to treat the rate limit header
value as a comma-separated list and enforce rate limiting based on the
first value in that list.

## What is the current behavior?

Certain HTTP headers, such as `X-Forwarded-For` and other headers that
are combined according to RFC 7230, can be represented as a
comma-separated list of values. Intermediate proxies may add their own
values to these headers, modifying the resulting value. For example, an
end user with a single IP address proxied through a fleet of load
balancers using the X-Forwarded-For header may be associated with
multiple `X-Forwarded-For` header values, e.g.,
`2.2.2.2,100.100.100.100` and `2.2.2.2,300.300.300.300`. The current
implementation of `performRateLimiting` treats each of these as separate
rate limiting keys.

## What is the new behavior?

This PR splits the rate limit header by commas and takes the first value
(with whitespace removed) to use as the rate limiting key.

Note that this logic is superficially similar to the
`utilities.GetIPAddress` function with two key differences. In
`performRateLimiting`, there is no set format for a given rate limiting
key, nor is there a fallback value after the first value in the list
that the API should use.

28 of 30 new or added lines in 1 file covered. (93.33%)

14670 of 21425 relevant lines covered (68.47%)

77.91 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
76.85
0.87% internal/api/middleware.go
Jobs
ID Job ID Ran Files Coverage
1 20069619121.1 09 Dec 2025 03:58PM UTC 170
68.47
GitHub Action Run
Source Files on build 20069619121
  • Tree
  • List 170
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 5f2e2792 on github
  • Prev Build on master (#20062718781)
  • Next Build on master (#20080137533)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc