GitLab Pages - too many requests when trying to access website through browsers

I’m getting a 429/Too many requests received error when I try and access my website via a browser. I’m just seeing this issue now. I can still run builds on the project, but can’t access via browser.

4 Likes

same issue with all of my sites , any solution ?

The issue seems to be with Cloudflare. I guess Cloudflare’s CDN is hitting GitLab pages with too many requests and triggering the rate limiter. Don’t know if the issue is on CloudFlare or GitLab’s side.

Turning off Cloudflare for your domain (unchecking the little orange cloud in the dashboard) works, but you lose most of the benefits of Cloudflare including universal SSL and any page rules you have set up.

2 Likes

Your work around works exactly like you say. Have you opened a ticket with Cloudflare yet?

1 Like

Related Cloudflare forum thread:

Cloudflare generally requires that the websites behind the CDN whitelist their IP addresses, and use the header Cf-Connecting-IP to get the visitor’s correct IP address.

https://support.cloudflare.com/hc/en-us/sections/200805497-Restoring-Visitor-IPs

I imagine some code work on the Gitlab pages side would be required to fix this rate limiter functionality. The code should first check the connecting IP against a list of Cloudflare IP addresses https://cloudflare.com/ips and only use the Cf-Connecting-IP header when it’s coming from a CF IP.

Note: X-Forwarded-For is also set:


Edit: made a issue on the gitlab-pages repo about the issue with a fix.

2 Likes

Awesome, thanks for eveyone’s help!

Same issue here.