Skip to content

Commit 4d1ca99

Browse files
committed
docs: Update README with new V2 rewrite rules guidance
1 parent e8bb12e commit 4d1ca99

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,25 +183,29 @@ Use the Cloudflare UI to create the rules by going to Rules > Transform Rules.
183183

184184
Create a **Rewrite URL** rule.
185185

186+
```
186187
**If incoming requests match...**: Custom filter expression
187188

188189
**URI Path**: `equals` `/v2/`
189190

190191
**Expression Preview**: `(http.request.uri.path eq "/v2/")` (optionally also add your hostname for a better match)
191192

192193
**Then...**: Path > Rewrite to... > Static > `/v2` (without the trailing slash)
194+
```
193195
194196
##### V2 Ping Fix - /v2/ requires `Docker-Distribution-API-Version` header
195197
196198
Create a **Modify Response Header** rule.
197199
200+
```
198201
**If incoming requests match...**: Custom filter expression
199202

200203
**URI Path**: `starts with` `/v2/`
201204

202205
**Expression Preview**: `(starts_with(http.request.uri.path, "/v2"))` (optionally also add your hostname for a better match)
203206

204207
**Then...**: Set static > `Docker-Distribution-API-Version` > `registry/2.0`
208+
```
205209
206210
#### S3 (target only)
207211

0 commit comments

Comments
 (0)