Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • slapos slapos
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 132
    • Merge requests 132
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedinexedi
  • slaposslapos
  • Merge requests
  • !2067

gitlab: decrease impact of the dumbest crawlers

  • Review changes

  • Download
  • Patches
  • Plain diff
Open Nicolas Wavrant requested to merge gitlab-bot-protection into master Apr 22, 2026
  • Overview 9
  • Commits 1
  • Pipelines 0
  • Changes 2

Use the approach presented here: https://her.esy.fun/posts/0031-how-i-protect-my-forgejo-instance-from-ai-web-crawlers/index.html

to try to reduce the log caused by crawlers.

The idea is make users visiting the website with a JS-enabled browser register a cookie, and then redirect them transparently to the website. If the cookie is set, they can access it. If not, they loop on the simple webpage served by nginx asking them to set the cookie.

There is an exception when the user agent is the git command line.

This approach is completely transparent for the users.

There will probably be other impacts on our infrastructure, for exemple code retrieving the JSON schemas. Let's address this after we can prove this change has any effect on the bot traffic.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: gitlab-bot-protection
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7