File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -183,25 +183,29 @@ Use the Cloudflare UI to create the rules by going to Rules > Transform Rules.
183
183
184
184
Create a **Rewrite URL** rule.
185
185
186
+ ```
186
187
** If incoming requests match...** : Custom filter expression
187
188
188
189
** URI Path** : ` equals ` ` /v2/ `
189
190
190
191
** Expression Preview** : ` (http.request.uri.path eq "/v2/") ` (optionally also add your hostname for a better match)
191
192
192
193
** Then...** : Path > Rewrite to... > Static > ` /v2 ` (without the trailing slash)
194
+ ```
193
195
194
196
##### V2 Ping Fix - /v2/ requires `Docker-Distribution-API-Version` header
195
197
196
198
Create a **Modify Response Header** rule.
197
199
200
+ ```
198
201
** If incoming requests match...** : Custom filter expression
199
202
200
203
** URI Path** : ` starts with ` ` /v2/ `
201
204
202
205
** Expression Preview** : ` (starts_with(http.request.uri.path, "/v2")) ` (optionally also add your hostname for a better match)
203
206
204
207
** Then...** : Set static > ` Docker-Distribution-API-Version ` > ` registry/2.0 `
208
+ ```
205
209
206
210
#### S3 (target only)
207
211
You can’t perform that action at this time.
0 commit comments