mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-10 18:48:44 +00:00
Fixes #1252 This is technically a regression as these clients used to work in Anubis v1.22.0, however it is allowable to make this opt-in as most websites do not expect to be serving Docker / OCI registry client traffic. Signed-off-by: Xe Iaso <me@xeiaso.net>
26 lines
688 B
YAML
26 lines
688 B
YAML
- name: allow-docker-client
|
|
action: ALLOW
|
|
expression:
|
|
all:
|
|
- path.startsWith("/v2/")
|
|
- userAgent.contains("docker/")
|
|
- userAgent.contains("git-commit/")
|
|
- '"Accept" in headers'
|
|
- headers["Accept"].contains("vnd.docker.distribution")
|
|
- '"Baggage" in headers'
|
|
- headers["Baggage"].contains("trigger")
|
|
|
|
- name: allow-crane-client
|
|
action: ALLOW
|
|
expression:
|
|
all:
|
|
- userAgent.contains("crane/")
|
|
- userAgent.contains("go-containerregistry/")
|
|
|
|
- name: allow-docker-distribution-api-client
|
|
action: ALLOW
|
|
expression:
|
|
all:
|
|
- '"Docker-Distribution-Api-Version" in headers'
|
|
- '!(userAgent.contains("Mozilla"))'
|