Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Terraform, Cache] Fix anchors in internal links #19303

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: ​Purge by single-file
pcx_content_type: how-to
sidebar:
order: 1

---

With purge by single-file, cached resources are instantly removed from the stored assets in your Content Delivery Network (CDN) across all data centers. New requests for the purged asset receive the latest version from your origin web server and add it back to your CDN cache within the specific Cloudflare data center that served the request.
Expand All @@ -12,24 +11,20 @@ The single-file purge rate limit for the Free subscription is 1,000 URLs/minute.

A single-file purge performed through your Cloudflare dashboard does not clear objects that contain any of the following:

* [Custom cache keys](/cache/how-to/cache-keys/)
* [Origin header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin)
* Any of these request headers:
* `X-Forwarded-Host`
* `X-Host`
* `X-Forwarded-Scheme`
* `X-Original-URL`
* `X-Rewrite-URL`
* `Forwarded`

You can purge objects with these characteristics using an API call to ([purge files by URL](/api/resources/cache/methods/purge/#purge-cached-content-by-url)). In the data/header section of the API call, you must include all headers and cache keys contained in the cached resource, along with their matching values.

:::caution[Warning]
- [Custom cache keys](/cache/how-to/cache-keys/)
- [Origin header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin)
- Any of these request headers:
- `X-Forwarded-Host`
- `X-Host`
- `X-Forwarded-Scheme`
- `X-Original-URL`
- `X-Rewrite-URL`
- `Forwarded`

You can purge objects with these characteristics using an API call to ([purge files by URL](/api/resources/cache/methods/purge/)). In the data/header section of the API call, you must include all headers and cache keys contained in the cached resource, along with their matching values.

:::caution
Always use UTF-8 encoded URLs for single-file cache purges. Wildcards are not supported on single file purge, and you must use purge by hostname, prefix, or implement cache tags as an alternative solution. All of the listed options are Enterprise features.


:::

1. Log in to your [Cloudflare dashboard](https://dash.cloudflare.com/login), and select your account and domain.
Expand All @@ -41,20 +36,12 @@ Always use UTF-8 encoded URLs for single-file cache purges. Wildcards are not su
7. Review your entries.
8. Select **Purge**.

:::note[Note]


For information on how to use single-file purge to purge assets cached by a Workers fetch, refer to [​​Using Workers to purge](/workers/reference/how-the-cache-works/#single-file-purge--assets-cached-by-a-worker).


:::note
For information on how to use single-file purge to purge assets cached by a Workers fetch, refer to [Using Workers to purge](/workers/reference/how-the-cache-works/#single-file-purge-assets-cached-by-a-worker).
:::

:::caution[Warning]


:::caution
If you have a [Transform Rule](/rules/transform/) in place that is modifying part of a URL path, you must use the non-transform (end user) URL when performing single file purge so that purge can take effect.


:::

## Resulting cache status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ resource "cloudflare_ruleset" "zone_custom_firewall" {
### Add a custom rule challenging requests with leaked credentials

:::note
For more information on enabling leaked credentials detection using Terraform, refer to the [leaked credentials detection](/waf/detections/leaked-credentials/get-started/#1-turn-on-leaked-credentials-detection) documentation.
For more information on enabling leaked credentials detection using Terraform, refer to the [leaked credentials detection](/waf/detections/leaked-credentials/get-started/#1-turn-on-the-detection) documentation.
:::

This example adds a custom rule that challenges requests with leaked credentials by using one of the [leaked credentials fields](/waf/detections/leaked-credentials/#leaked-credentials-fields) in the rule expression.
Expand Down
Loading