diff --git a/src/content/changelogs/r2.yaml b/src/content/changelogs/r2.yaml index 6b6dfe446cca80..8db20a049ad2fa 100644 --- a/src/content/changelogs/r2.yaml +++ b/src/content/changelogs/r2.yaml @@ -1,5 +1,5 @@ --- -link: "/r2/reference/changelog/" +link: "/r2/platform/changelog/" productName: R2 productLink: "/r2/" productArea: Developer platform @@ -16,8 +16,8 @@ entries: - When an `OPTIONS` request against the public entrypoint does not include an `origin` header, an `HTTP 400` instead of an `HTTP 401` is returned. - publish_date: "2024-02-06" description: |- - - The response shape of `GET /buckets/:bucket/sippy` has changed. - - The `/buckets/:bucket/sippy/validate` endpoint is exposed over APIGW to validate Sippy's configuration. + - The response shape of `GET /buckets/:bucket/sippy` has changed. + - The `/buckets/:bucket/sippy/validate` endpoint is exposed over APIGW to validate Sippy's configuration. - The shape of the configuration object when modifying Sippy's configuration has changed. - publish_date: "2024-01-30" description: |- @@ -30,7 +30,7 @@ entries: - Sippy is available for Google Cloud Storage (GCS) beta. - publish_date: "2023-12-11" description: |- - - The `x-id` query param for `S3 ListBuckets` action is now ignored. + - The `x-id` query param for `S3 ListBuckets` action is now ignored. - The `x-id` query param is now ignored for all S3 actions. - publish_date: "2023-10-23" description: |- diff --git a/src/content/compatibility-dates/dynamic-dispatch-tunnel-exceptions.md b/src/content/compatibility-dates/dynamic-dispatch-tunnel-exceptions.md index e0e747cfb8d337..0dd4539961ec51 100644 --- a/src/content/compatibility-dates/dynamic-dispatch-tunnel-exceptions.md +++ b/src/content/compatibility-dates/dynamic-dispatch-tunnel-exceptions.md @@ -11,4 +11,4 @@ enable_flag: "dynamic_dispatch_tunnel_exceptions" disable_flag: "dynamic_dispatch_treat_exceptions_as_500" --- -Previously, when using Workers for Platforms' [dynamic dispatch API](/cloudflare-for-platforms/workers-for-platforms/get-started/dynamic-dispatch/) to send an HTTP request to a user Worker, if the user Worker threw an exception, the dynamic dispatch Worker would receive an HTTP `500` error with no body. When the `dynamic_dispatch_tunnel_exceptions` compatibility flag is enabled, the exception will instead propagate back to the dynamic dispatch Worker. The `fetch()` call in the dynamic dispatch Worker will throw the same exception. This matches the similar behavior of [service bindings](/workers/runtime-apis/bindings/service-bindings/#service-bindings) and [Durable Objects](/durable-objects/). \ No newline at end of file +Previously, when using Workers for Platforms' [dynamic dispatch API](/cloudflare-for-platforms/workers-for-platforms/get-started/dynamic-dispatch/) to send an HTTP request to a user Worker, if the user Worker threw an exception, the dynamic dispatch Worker would receive an HTTP `500` error with no body. When the `dynamic_dispatch_tunnel_exceptions` compatibility flag is enabled, the exception will instead propagate back to the dynamic dispatch Worker. The `fetch()` call in the dynamic dispatch Worker will throw the same exception. This matches the similar behavior of [service bindings](/workers/runtime-apis/bindings/service-bindings/) and [Durable Objects](/durable-objects/). \ No newline at end of file diff --git a/src/content/compatibility-dates/no-cfbotmanagement-default.md b/src/content/compatibility-dates/no-cfbotmanagement-default.md index 53a7f3d362d913..0cf40d5817b56c 100644 --- a/src/content/compatibility-dates/no-cfbotmanagement-default.md +++ b/src/content/compatibility-dates/no-cfbotmanagement-default.md @@ -14,6 +14,6 @@ disable_flag: "cf_botmanagement_default" This flag streamlines Workers requests by reducing unnecessary properties in the `request.cf` object. -With the flag enabled - either by default after 2023-08-01 or by setting the `no_cf_botmanagement_default` flag - Cloudflare will only include the [Bot Management object](/bots/reference/bot-management-variables/#bot-management-variables) in a Worker's `request.cf` if the account has access to Bot Management. +With the flag enabled - either by default after 2023-08-01 or by setting the `no_cf_botmanagement_default` flag - Cloudflare will only include the [Bot Management object](/bots/reference/bot-management-variables/) in a Worker's `request.cf` if the account has access to Bot Management. With the flag disabled, Cloudflare will include a default Bot Management object, regardless of whether the account is entitled to Bot Management. diff --git a/src/content/compatibility-dates/python-workers.md b/src/content/compatibility-dates/python-workers.md index a3a2a615c39bb9..c523e7229a9f85 100644 --- a/src/content/compatibility-dates/python-workers.md +++ b/src/content/compatibility-dates/python-workers.md @@ -10,4 +10,4 @@ enable_date: "2024-01-29" enable_flag: "python_workers" --- -This flag enables first class support for Python. [Python Workers](/workers/languages/python/#python) implement the majority of Python's [standard library](/workers/languages/python/stdlib), support all [bindings](/workers/runtime-apis/bindings), [environment variable](/workers/configuration/environment-variables), and [secrets](/workers/configuration/secrets), and integration with JavaScript objects and functions via a [foreign function interface](/workers/languages/python/ffi). +This flag enables first class support for Python. [Python Workers](/workers/languages/python/) implement the majority of Python's [standard library](/workers/languages/python/stdlib), support all [bindings](/workers/runtime-apis/bindings), [environment variable](/workers/configuration/environment-variables), and [secrets](/workers/configuration/secrets), and integration with JavaScript objects and functions via a [foreign function interface](/workers/languages/python/ffi). diff --git a/src/content/docs/cache/troubleshooting/always-online.mdx b/src/content/docs/cache/troubleshooting/always-online.mdx index 7ab05d315e1dab..7c141b58c8d38a 100644 --- a/src/content/docs/cache/troubleshooting/always-online.mdx +++ b/src/content/docs/cache/troubleshooting/always-online.mdx @@ -4,44 +4,46 @@ pcx_content_type: troubleshooting head: - tag: title content: Always Online - Troubleshooting - --- Observe the following best practices when enabling Always Online with Internet Archive integration. -* **Allow requests from the Internet Archive IP addresses.** Origin servers receive requests from the Internet Archive IPs. Make sure you are not blocking requests from the Internet Archive IP range: `207.241.224.0/20` and `208.70.24.0/21`. -* **The Internet Archive does not consider your origin server’s cache-control header.** When the Internet Archive is crawling sites, it will crawl sites regardless of their cache-control, since the Internet Archive does not cache assets, but archives them. -* **Consider potential conflicts with Cloudflare features that transform URIs.** Always Online with Internet Archive integration may cause issues with Cache Rules and other Cloudflare features that transform URIs due to the way the Internet Archive crawls pages to archive. Specifically, some redirects that take place at the edge may cause the Internet Archive's crawler not to archive the target URL. Before enabling Origin Cache Control, review [how Cloudflare caches resources by default](/cache/concepts/default-cache-behavior/) as well as any Cache Rules you have configured so that you can avoid these issues. If you experience problems, disable Always Online. -* **Do not block Known Bots or Verified Bots via a WAF custom rule.** If you block either of these bot lists, the Internet Archive will not be able to crawl. +- **Allow requests from the Internet Archive IP addresses.** Origin servers receive requests from the Internet Archive IPs. Make sure you are not blocking requests from the Internet Archive IP range: `207.241.224.0/20` and `208.70.24.0/21`. +- **The Internet Archive does not consider your origin server's cache-control header.** When the Internet Archive is crawling sites, it will crawl sites regardless of their cache-control, since the Internet Archive does not cache assets, but archives them. +- **Consider potential conflicts with Cloudflare features that transform URIs.** Always Online with Internet Archive integration may cause issues with Cache Rules and other Cloudflare features that transform URIs due to the way the Internet Archive crawls pages to archive. Specifically, some redirects that take place at the edge may cause the Internet Archive's crawler not to archive the target URL. Before enabling Origin Cache Control, review [how Cloudflare caches resources by default](/cache/concepts/default-cache-behavior/) as well as any Cache Rules you have configured so that you can avoid these issues. If you experience problems, disable Always Online. +- **Do not block Known Bots or Verified Bots via a WAF custom rule.** If you block either of these bot lists, the Internet Archive will not be able to crawl. Do not use Always Online with: -* API traffic. -* An [IP Access rule](/waf/tools/ip-access-rules/) or a [WAF custom rule](/waf/custom-rules/) that blocks the United States or -* Bypass Cache cache rules. Always Online ignores Bypass Cache cache rules and serves Always Online cached assets. +- API traffic. +- An [IP Access rule](/waf/tools/ip-access-rules/) or a [WAF custom rule](/waf/custom-rules/) that blocks the United States or +- Bypass Cache cache rules. Always Online ignores Bypass Cache cache rules and serves Always Online cached assets. ## Limitations There are limitations with the Always Online functionality: 1. Always Online is not immediately active for sites recently added due to: - * DNS record propagation, which can take 24-72 hours - * Always Online has not initially crawled the website + - DNS record propagation, which can take 24-72 hours + - Always Online has not initially crawled the website 2. Cloudflare cannot show private content behind logins or handle form submission (POSTs) if your origin web server is offline. -Always Online does not trigger for HTTP response codes such as [404](/support/troubleshooting/http-status-codes/4xx-client-error/#404-not-foundrfc7231httpstoolsietforghtmlrfc7231), [503](/support/troubleshooting/cloudflare-errors/troubleshooting-cloudflare-5xx-errors/#error-503-service-temporarily-unavailable), or [500](/support/troubleshooting/cloudflare-errors/troubleshooting-cloudflare-5xx-errors/#error-500-internal-server-error) errors such as database connection errors or internal server errors. +Always Online does not trigger for HTTP response codes such as [404](/support/troubleshooting/http-status-codes/4xx-client-error/#404-not-foundrfc7231-), [503](/support/troubleshooting/cloudflare-errors/troubleshooting-cloudflare-5xx-errors/#error-503-service-temporarily-unavailable), or [500](/support/troubleshooting/cloudflare-errors/troubleshooting-cloudflare-5xx-errors/#error-500-internal-server-error) errors such as database connection errors or internal server errors. ## Frequently asked questions 1. How can I know if a page has been crawled? - * You can go to the [Internet Archive](https://web.archive.org/) and search for the page URL to see if it has been crawled or not. - * You can also check this via the [Internet Archive Availability API](https://archive.org/help/wayback_api.php). + + - You can go to the [Internet Archive](https://web.archive.org/) and search for the page URL to see if it has been crawled or not. + - You can also check this via the [Internet Archive Availability API](https://archive.org/help/wayback_api.php). 2. Why were not pages x, y, and z crawled? - * Since Cloudflare only requests to crawl the most popular pages on the site, it is possible that there will be missing pages. If you really want to archive a page, then you can visit the [Internet Archive](https://web.archive.org/save) save page and ask them to crawl a particular page. + + - Since Cloudflare only requests to crawl the most popular pages on the site, it is possible that there will be missing pages. If you really want to archive a page, then you can visit the [Internet Archive](https://web.archive.org/save) save page and ask them to crawl a particular page. 3. What IP addresses do we need to allowlist to make sure crawling works? - * IP Range: `207.241.224.0/20` and `208.70.24.0/21`. Note that this ip range belongs to Internet Archive and NOT Cloudflare, since it is the Internet Archive that does the crawling. + + - IP Range: `207.241.224.0/20` and `208.70.24.0/21`. Note that this ip range belongs to Internet Archive and NOT Cloudflare, since it is the Internet Archive that does the crawling. 4. What user agent should the origin expect to see? - * Currently the Internet Archive uses: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/605.1.15`. + - Currently the Internet Archive uses: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/605.1.15`. diff --git a/src/content/docs/cloudflare-one/connections/connect-devices/warp/configure-warp/route-traffic/warp-architecture.mdx b/src/content/docs/cloudflare-one/connections/connect-devices/warp/configure-warp/route-traffic/warp-architecture.mdx index a376764f9e5be2..642ae1ed407ebb 100644 --- a/src/content/docs/cloudflare-one/connections/connect-devices/warp/configure-warp/route-traffic/warp-architecture.mdx +++ b/src/content/docs/cloudflare-one/connections/connect-devices/warp/configure-warp/route-traffic/warp-architecture.mdx @@ -174,7 +174,7 @@ S -- No --> U["Virtual interface
(172.16.0.2)"] --> G[Cloudflare Gateway] #### Virtual interface -Virtual interfaces allow the operating system to logically subdivide a physical interface, such as a network interface controller (NIC), into separate interfaces for the purposes of routing IP traffic. WARP's virtual interface is what maintains the WireGuard/MASQUE connection between the device and Cloudflare. By default, its IP address is hardcoded as `172.16.0.2`. You can use [**Override local interface IP**](/cloudflare-one/connections/connect-devices/warp/configure-warp/warp-settings/#override-local-interface-ip) to assign unique IPs per device. +Virtual interfaces allow the operating system to logically subdivide a physical interface, such as a network interface controller (NIC), into separate interfaces for the purposes of routing IP traffic. WARP's virtual interface is what maintains the WireGuard/MASQUE connection between the device and Cloudflare. By default, its IP address is hardcoded as `172.16.0.2`. You can use [**Override local interface IP**](/cloudflare-one/connections/connect-devices/warp/configure-warp/warp-settings/#override-local-interface-ip-) to assign unique IPs per device. To view a list of all network interfaces on the operating system: diff --git a/src/content/docs/cloudflare-one/connections/connect-devices/warp/configure-warp/warp-sessions.mdx b/src/content/docs/cloudflare-one/connections/connect-devices/warp/configure-warp/warp-sessions.mdx index c8d2f2b1559d59..1d9ada775b2a46 100644 --- a/src/content/docs/cloudflare-one/connections/connect-devices/warp/configure-warp/warp-sessions.mdx +++ b/src/content/docs/cloudflare-one/connections/connect-devices/warp/configure-warp/warp-sessions.mdx @@ -7,7 +7,7 @@ sidebar: import { Render, Badge } from "~/components"; -Cloudflare Zero Trust enforces WARP client reauthentication on a per-application basis, unlike legacy VPNs which treat it as a global setting. You can configure WARP session timeouts for your [Access applications](#configure-warp-sessions-in-access) or as part of your [Gateway policies](#configure-warp-sessions-in-gateway). +Cloudflare Zero Trust enforces WARP client reauthentication on a per-application basis, unlike legacy VPNs which treat it as a global setting. You can configure WARP session timeouts for your [Access applications](#configure-warp-sessions-in-access-) or as part of your [Gateway policies](#configure-warp-sessions-in-gateway). diff --git a/src/content/docs/cloudflare-one/connections/connect-devices/warp/configure-warp/warp-settings/index.mdx b/src/content/docs/cloudflare-one/connections/connect-devices/warp/configure-warp/warp-settings/index.mdx index 20fe27df64bfce..f3d24f665a084e 100644 --- a/src/content/docs/cloudflare-one/connections/connect-devices/warp/configure-warp/warp-settings/index.mdx +++ b/src/content/docs/cloudflare-one/connections/connect-devices/warp/configure-warp/warp-settings/index.mdx @@ -131,7 +131,7 @@ Configures the protocol used to route IP traffic from the device to Cloudflare G **Value**: - **WireGuard**: (default) Establishes a [WireGuard](https://www.wireguard.com/) connection to Cloudflare. The WARP client will encrypt traffic using a non-FIPs compliant cipher suite, `TLS_CHACHA20_POLY1305_SHA256`. When switching from MASQUE to WireGuard, users may lose Internet connectivity if their Wi-Fi network blocks the [ports and IPs](/cloudflare-one/connections/connect-devices/warp/deployment/firewall/#warp-ingress-ip) required for WireGuard to function. -- **MASQUE** : Establishes an HTTP/3 connection to Cloudflare. To use MASQUE, [Override local interface IP](/cloudflare-one/connections/connect-devices/warp/configure-warp/warp-settings/#override-local-interface-ip) must be `Enabled`. The WARP client will encrypt traffic using TLS 1.3 and a [FIPS 140-2](https://csrc.nist.gov/pubs/fips/140-2/upd2/final) compliant cipher suite, `TLS_AES_256_GCM_SHA384`. +- **MASQUE** : Establishes an HTTP/3 connection to Cloudflare. To use MASQUE, [Override local interface IP](/cloudflare-one/connections/connect-devices/warp/configure-warp/warp-settings/#override-local-interface-ip-) must be `Enabled`. The WARP client will encrypt traffic using TLS 1.3 and a [FIPS 140-2](https://csrc.nist.gov/pubs/fips/140-2/upd2/final) compliant cipher suite, `TLS_AES_256_GCM_SHA384`. For more details on WireGuard versus MASQUE, refer to our [blog post](https://blog.cloudflare.com/zero-trust-warp-with-a-masque). diff --git a/src/content/docs/cloudflare-one/connections/connect-networks/private-net/warp-connector.mdx b/src/content/docs/cloudflare-one/connections/connect-networks/private-net/warp-connector.mdx index 71bfdd074dc56b..4f14f851976f4b 100644 --- a/src/content/docs/cloudflare-one/connections/connect-networks/private-net/warp-connector.mdx +++ b/src/content/docs/cloudflare-one/connections/connect-networks/private-net/warp-connector.mdx @@ -81,7 +81,7 @@ All WARP Connector and WARP client devices in your Zero Trust organization have 2. Enable **Proxy**. 3. Enable **Warp to Warp**. This allows Cloudflare to route traffic to the CGNAT IP space. 4. Next, go to **Settings** > **WARP Client**. -5. Enable [**Override local interface IP**](/cloudflare-one/connections/connect-devices/warp/configure-warp/warp-settings/#override-local-interface-ip). +5. Enable [**Override local interface IP**](/cloudflare-one/connections/connect-devices/warp/configure-warp/warp-settings/#override-local-interface-ip-). 6. [Check your Split Tunnel configuration](/cloudflare-one/connections/connect-networks/private-net/cloudflared/#3-route-private-network-ips-through-warp) and ensure that the CGNAT IP space (`100.96.0.0/12`) routes through WARP. For example, if you are using **Exclude** mode, delete `100.64.0.0/10` from the list and re-add `100.64.0.0/11` and `100.112.0.0/12`. diff --git a/src/content/docs/cloudflare-one/faq/teams-troubleshooting.mdx b/src/content/docs/cloudflare-one/faq/teams-troubleshooting.mdx index f893749e33ac66..9ae984f81dbfdf 100644 --- a/src/content/docs/cloudflare-one/faq/teams-troubleshooting.mdx +++ b/src/content/docs/cloudflare-one/faq/teams-troubleshooting.mdx @@ -106,7 +106,7 @@ Certain web browsers (such as Chrome and Microsoft Edge) load and cache root cer ## I see `Access api error auth_domain_cannot_be_updated_dash_sso`. -This error appears if you try to change your [team domain](/cloudflare-one/faq/teams-getting-started-faq/#whats-a-team-domain/team-name) while the [Cloudflare dashboard SSO](/cloudflare-one/applications/configure-apps/dash-sso-apps/) feature is enabled on your account. +This error appears if you try to change your [team domain](/cloudflare-one/faq/teams-getting-started-faq/#whats-a-team-domainteam-name) while the [Cloudflare dashboard SSO](/cloudflare-one/applications/configure-apps/dash-sso-apps/) feature is enabled on your account. Cloudflare dashboard SSO does not currently support team domain changes. Contact your account team for more details. ## WARP on Linux shows `DNS connectivity check failed`. diff --git a/src/content/docs/ddos-protection/managed-rulesets/http/index.mdx b/src/content/docs/ddos-protection/managed-rulesets/http/index.mdx index c44da38a21ba96..f4666835f1e048 100644 --- a/src/content/docs/ddos-protection/managed-rulesets/http/index.mdx +++ b/src/content/docs/ddos-protection/managed-rulesets/http/index.mdx @@ -29,6 +29,7 @@ You can adjust the behavior of the rules in the managed ruleset by modifying the - Certain actions or sensitivity levels may not be available to all Cloudflare plans. - Currently, you can only define account-level configurations (or overrides) for the HTTP DDoS Attack Protection managed ruleset via API. + ::: To adjust rule behavior, do one of the following: @@ -43,18 +44,17 @@ For more information on the available configuration parameters, refer to [Manage Cloudflare HTTP DDoS Protection can also initiate mitigation based on the origin health. Floods of requests that cause a high number of zone errors (default sensitivity level is 1,000 errors per second) can initiate mitigation to alleviate the strain on the zone. -| Rule ID | Description | -| --- | --- | +| Rule ID | Description | +| ---------------------------------- | ----------------------------------------------------- | | `dd42da7baabe4e518eaf11c393596a9d` | HTTP requests causing a high number of origin errors. | :::note - -This rule is available for zones on any plan. +This rule is available for zones on any plan. ::: The rule is adaptive for zones on the Pro, Business, or Enterprise plan. It performs an additional check for better detection accuracy: the errors-per-second rate must also be at least five times the normal traffic levels. -All HTTP errors in the 52x range (Internal Server Error) and all errors in the 53x range excluding [530](/support/troubleshooting/cloudflare-errors/troubleshooting-cloudflare-5xx-errors/#530error) are considered when factoring in the error rate. +All HTTP errors in the 52x range (Internal Server Error) and all errors in the 53x range excluding [530](/support/troubleshooting/cloudflare-errors/troubleshooting-cloudflare-5xx-errors/#error-530) are considered when factoring in the error rate. ## Availability diff --git a/src/content/docs/kv/concepts/kv-bindings.mdx b/src/content/docs/kv/concepts/kv-bindings.mdx index 11e6f78d02c27b..8d83ffddf2cb88 100644 --- a/src/content/docs/kv/concepts/kv-bindings.mdx +++ b/src/content/docs/kv/concepts/kv-bindings.mdx @@ -3,12 +3,11 @@ pcx_content_type: concept title: KV bindings sidebar: order: 7 - --- KV [bindings](/workers/runtime-apis/bindings/) allow for communication between a Worker and a KV namespace. -Configure KV bindings in the [wrangler.toml file](/workers/wrangler/configuration/#configure-wranglertoml). +Configure KV bindings in the [wrangler.toml file](/workers/wrangler/configuration/). ## Access KV from Workers @@ -38,14 +37,14 @@ With this, the deployed Worker will have a `TODO` field in their environment obj ```js export default { - async fetch(request, env, ctx) { - // Get the value for the "to-do:123" key - // NOTE: Relies on the `TODO` KV binding that maps to the "My Tasks" namespace. - let value = await env.TODO.get("to-do:123"); - - // Return the value, as is, for the Response - return new Response(value); - }, + async fetch(request, env, ctx) { + // Get the value for the "to-do:123" key + // NOTE: Relies on the `TODO` KV binding that maps to the "My Tasks" namespace. + let value = await env.TODO.get("to-do:123"); + + // Return the value, as is, for the Response + return new Response(value); + }, }; ``` @@ -73,14 +72,14 @@ An example might look like: ```js export class DurableObject { - constructor(state, env) { - this.state = state; - this.env = env; - } - - async fetch(request) { - const valueFromKV = await this.env.NAMESPACE.get("someKey"); - return new Response(valueFromKV); - } + constructor(state, env) { + this.state = state; + this.env = env; + } + + async fetch(request) { + const valueFromKV = await this.env.NAMESPACE.get("someKey"); + return new Response(valueFromKV); + } } ``` diff --git a/src/content/docs/kv/reference/environments.mdx b/src/content/docs/kv/reference/environments.mdx index 906daeb09e5e53..780990cc4aa8a5 100644 --- a/src/content/docs/kv/reference/environments.mdx +++ b/src/content/docs/kv/reference/environments.mdx @@ -5,7 +5,7 @@ sidebar: order: 3 --- -KV namespaces can be used with [environments](/workers/wrangler/environments/#environments). This is useful when you have code in your Worker that refers to a KV binding like `MY_KV`, and you want to have these bindings point to different KV namespaces (for example, one for staging and one for production). +KV namespaces can be used with [environments](/workers/wrangler/environments/). This is useful when you have code in your Worker that refers to a KV binding like `MY_KV`, and you want to have these bindings point to different KV namespaces (for example, one for staging and one for production). The following code in the `wrangler.toml` file shows you how to have two environments that have two different KV namespaces but the same binding name: diff --git a/src/content/docs/learning-paths/secure-internet-traffic/connect-networks/choose-on-ramp.mdx b/src/content/docs/learning-paths/secure-internet-traffic/connect-networks/choose-on-ramp.mdx index 794ae5fe785436..a88d79f549d745 100644 --- a/src/content/docs/learning-paths/secure-internet-traffic/connect-networks/choose-on-ramp.mdx +++ b/src/content/docs/learning-paths/secure-internet-traffic/connect-networks/choose-on-ramp.mdx @@ -3,16 +3,15 @@ title: Choose an on-ramp pcx_content_type: learning-unit sidebar: order: 2 - --- -import { GlossaryDefinition, GlossaryTooltip, Badge } from "~/components" +import { GlossaryDefinition, GlossaryTooltip, Badge } from "~/components"; Similar to the network onboarding practices in the [Replace your VPN](/learning-paths/replace-vpn/connect-private-network/) implementation guide, there are a number of ways to on-ramp your network traffic to the Cloudflare global network. In our recommended approach to security, you will source traffic from devices that would otherwise go to the Internet through a default route. Relevant targets for this may be branch offices, network subnets that need a secure path to the Internet, or anywhere that you control the Internet paths for groups of devices. ## Available on-ramps -The primary ways to source multi-device or network traffic to the Cloudflare network are via the [WARP Connector](#warp-connector) as an all-ports traffic proxy, or via upstream DNS for a whole network using [DNS filtering locations](#dns-filtering-locations). Alternatively, Enterprise users can add [Magic WAN](#magic-wan) to their plan and configure Magic WAN Connector or a dedicated third-party device. +The primary ways to source multi-device or network traffic to the Cloudflare network are via the [WARP Connector](#warp-connector-) as an all-ports traffic proxy, or via upstream DNS for a whole network using [DNS filtering locations](#dns-filtering-locations). Alternatively, Enterprise users can add [Magic WAN](#magic-wan) to their plan and configure Magic WAN Connector or a dedicated third-party device. ### WARP Connector @@ -33,11 +32,10 @@ For more information on setting up DNS locations, refer to [Add locations](/clou ### Magic WAN :::note - Only available on Enterprise plans. ::: -[Magic WAN](/magic-wan/) is Cloudflare's offering most analogous to a traditional SD-WAN. Magic WAN is typically deployed via an IPSec or GRE tunnel terminating on customer devices (such as firewalls or routers), or via our Magic WAN Connector hardware device. You can also be deploy Magic WAN using [Cloudflare Network Interconnect](/network-interconnect/) (CNI) at private peering locations or some public cloud instances (where compatible). +[Magic WAN](/magic-wan/) is Cloudflare's offering most analogous to a traditional SD-WAN. Magic WAN is typically deployed via an IPsec or GRE tunnel terminating on customer devices (such as firewalls or routers), or via our Magic WAN Connector hardware device. You can also be deploy Magic WAN using [Cloudflare Network Interconnect](/network-interconnect/) (CNI) at private peering locations or some public cloud instances (where compatible). Magic WAN on-ramps and off-ramps traffic via your connections after transiting the Cloudflare global network. Gateway can also apply network and HTTP policies to this traffic for secure egress. diff --git a/src/content/docs/magic-transit/reference/tunnel-health-checks.mdx b/src/content/docs/magic-transit/reference/tunnel-health-checks.mdx index 6518ad70a95604..37b21fa9f50458 100644 --- a/src/content/docs/magic-transit/reference/tunnel-health-checks.mdx +++ b/src/content/docs/magic-transit/reference/tunnel-health-checks.mdx @@ -4,9 +4,17 @@ pcx_content_type: concept head: [] description: Magic Transit uses probes to check for tunnel health. Review information on this page to learn more. - --- -import { Render } from "~/components" +import { Render } from "~/components"; - + diff --git a/src/content/docs/magic-wan/on-ramps.mdx b/src/content/docs/magic-wan/on-ramps.mdx index 658a37048acc30..98d4c249c98bed 100644 --- a/src/content/docs/magic-wan/on-ramps.mdx +++ b/src/content/docs/magic-wan/on-ramps.mdx @@ -3,7 +3,6 @@ title: On-ramps pcx_content_type: reference sidebar: order: 4 - --- To on-ramp your network traffic to Magic WAN, you can use [Magic WAN Connector](/magic-wan/configuration/connector/), a lightweight software package you can install in corporate network locations to automatically connect, steer, and shape any IP traffic. @@ -13,7 +12,7 @@ You can also use any device that supports [GRE or IPsec](/magic-wan/configuratio Additional compatible on-ramps include: - [Cloudflare Network Interconnect (CNI)](/magic-wan/network-interconnect/): Connect your network infrastructure directly with Cloudflare – rather than using the public Internet – for a more reliable and secure experience. -- [Cloudflare Tunnel](/magic-wan/zero-trust/cloudflare-tunnel/#cloudflare-tunnel): Magic WAN can be used together with Cloudflare Tunnel for easy access between your networks and applications. +- [Cloudflare Tunnel](/magic-wan/zero-trust/cloudflare-tunnel/): Magic WAN can be used together with Cloudflare Tunnel for easy access between your networks and applications. - [WARP](/cloudflare-one/connections/connect-devices/warp/): Protect corporate devices by securely and privately sending traffic from those devices to Cloudflare’s global network, where Cloudflare Gateway can apply advanced web filtering. - [Magic Cloud Networking](/magic-wan/configuration/magic-cloud-networking/): Automatically create on-ramps from your cloud networks to Magic WAN. - [Network on-ramp partnerships](https://www.cloudflare.com/network-onramp-partners/): Refer to our [third-party integration tutorials](/magic-wan/configuration/manually/third-party/) for guidance on configuring the most asked for third-party products. diff --git a/src/content/docs/magic-wan/zero-trust/cloudflare-gateway.mdx b/src/content/docs/magic-wan/zero-trust/cloudflare-gateway.mdx index ffe1d633e38a7c..18e33c619059dc 100644 --- a/src/content/docs/magic-wan/zero-trust/cloudflare-gateway.mdx +++ b/src/content/docs/magic-wan/zero-trust/cloudflare-gateway.mdx @@ -45,7 +45,7 @@ This traffic will egress from Cloudflare according to the [egress policies](/clo ## Private traffic -By default, TCP, UDP, and ICMP traffic routed through Magic WAN tunnels and destined to routes behind [Cloudflare Tunnel](/cloudflare-one/connections/connect-networks/#cloudflare-tunnel) will be proxied/filtered through Cloudflare Gateway. +By default, TCP, UDP, and ICMP traffic routed through Magic WAN tunnels and destined to routes behind [Cloudflare Tunnel](/cloudflare-one/connections/connect-networks/) will be proxied/filtered through Cloudflare Gateway. Contact your account team to enable Gateway filtering for traffic destined to routes behind Magic WAN tunnels. If enabled, by default, TCP and UDP traffic sourced from and destined to [RFC1918](https://datatracker.ietf.org/doc/html/rfc1918) space, [WARP](/cloudflare-one/connections/connect-devices/warp/), or [BYO](/byoip/) or [Leased IPs](/magic-transit/cloudflare-ips/) with source port higher than `1023` and destination port lower than `1024` will be proxied/filtered by Cloudflare Gateway. diff --git a/src/content/docs/magic-wan/zero-trust/warp.mdx b/src/content/docs/magic-wan/zero-trust/warp.mdx index d45796c2b40720..5feaa6e733a15d 100644 --- a/src/content/docs/magic-wan/zero-trust/warp.mdx +++ b/src/content/docs/magic-wan/zero-trust/warp.mdx @@ -57,7 +57,7 @@ You must log out and log back in with at least one WARP device to ensure the con ## Test WARP integration -Before testing, be sure to [configure domain fallback](/cloudflare-one/connections/connect-devices/warp/configure-warp/route-traffic/local-domains/#configure-local-domain-fallback) for the server or service in WARP settings. This is needed because by default Cloudflare Zero Trust excludes common top level domains used for local resolution from being sent to Gateway for processing. +Before testing, be sure to [configure domain fallback](/cloudflare-one/connections/connect-devices/warp/configure-warp/route-traffic/local-domains/#add-a-domain) for the server or service in WARP settings. This is needed because by default Cloudflare Zero Trust excludes common top level domains used for local resolution from being sent to Gateway for processing. If WARP integration has been enabled for the account within the last day, log off and on again in the WARP client before testing. diff --git a/src/content/docs/stream/manage-video-library/creator-id.mdx b/src/content/docs/stream/manage-video-library/creator-id.mdx index 02d4ede48d8a03..9bb8b1e10e3a3c 100644 --- a/src/content/docs/stream/manage-video-library/creator-id.mdx +++ b/src/content/docs/stream/manage-video-library/creator-id.mdx @@ -1,7 +1,6 @@ --- pcx_content_type: how-to title: Manage creators - --- You can set the creator field with an internal user ID at the time a tokenized upload URL is requested. When the video is uploaded, the creator property is automatically set to the internal user ID which can be used for analytics data or when searching for videos by a specific creator. @@ -21,57 +20,55 @@ curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/stream/copy" \ ```json null {35} { - "success": true, - "errors": [], - "messages": [], - "result": { - "allowedOrigins": [ - "example.com" - ], - "created": "2014-01-02T02:20:00Z", - "duration": 300, - "input": { - "height": 1080, - "width": 1920 - }, - "maxDurationSeconds": 300, - "meta": {}, - "modified": "2014-01-02T02:20:00Z", - "uploadExpiry": "2014-01-02T02:20:00Z", - "playback": { - "hls": "https://customer-f33zs165nr7gyfy4.cloudflarestream.com/6b9e68b07dfee8cc2d116e4c51d6a957/manifest/video.m3u8", - "dash": "https://customer-f33zs165nr7gyfy4.cloudflarestream.com/6b9e68b07dfee8cc2d116e4c51d6a957/manifest/video.mpd" - }, - "preview": "https://customer-f33zs165nr7gyfy4.cloudflarestream.com/6b9e68b07dfee8cc2d116e4c51d6a957/watch", - "readyToStream": true, - "requireSignedURLs": true, - "size": 4190963, - "status": { - "state": "ready", - "pctComplete": "100.000000", - "errorReasonCode": "", - "errorReasonText": "" - }, - "thumbnail": "https://customer-f33zs165nr7gyfy4.cloudflarestream.com/6b9e68b07dfee8cc2d116e4c51d6a957/thumbnails/thumbnail.jpg", - "thumbnailTimestampPct": 0.529241, - "creator": "", - "uid": "6b9e68b07dfee8cc2d116e4c51d6a957", - "liveInput": "fc0a8dc887b16759bfd9ad922230a014", - "uploaded": "2014-01-02T02:20:00Z", - "watermark": { - "uid": "6b9e68b07dfee8cc2d116e4c51d6a957", - "size": 29472, - "height": 600, - "width": 400, - "created": "2014-01-02T02:20:00Z", - "downloadedFrom": "https://company.com/logo.png", - "name": "Marketing Videos", - "opacity": 0.75, - "padding": 0.1, - "scale": 0.1, - "position": "center" - } - } + "success": true, + "errors": [], + "messages": [], + "result": { + "allowedOrigins": ["example.com"], + "created": "2014-01-02T02:20:00Z", + "duration": 300, + "input": { + "height": 1080, + "width": 1920 + }, + "maxDurationSeconds": 300, + "meta": {}, + "modified": "2014-01-02T02:20:00Z", + "uploadExpiry": "2014-01-02T02:20:00Z", + "playback": { + "hls": "https://customer-f33zs165nr7gyfy4.cloudflarestream.com/6b9e68b07dfee8cc2d116e4c51d6a957/manifest/video.m3u8", + "dash": "https://customer-f33zs165nr7gyfy4.cloudflarestream.com/6b9e68b07dfee8cc2d116e4c51d6a957/manifest/video.mpd" + }, + "preview": "https://customer-f33zs165nr7gyfy4.cloudflarestream.com/6b9e68b07dfee8cc2d116e4c51d6a957/watch", + "readyToStream": true, + "requireSignedURLs": true, + "size": 4190963, + "status": { + "state": "ready", + "pctComplete": "100.000000", + "errorReasonCode": "", + "errorReasonText": "" + }, + "thumbnail": "https://customer-f33zs165nr7gyfy4.cloudflarestream.com/6b9e68b07dfee8cc2d116e4c51d6a957/thumbnails/thumbnail.jpg", + "thumbnailTimestampPct": 0.529241, + "creator": "", + "uid": "6b9e68b07dfee8cc2d116e4c51d6a957", + "liveInput": "fc0a8dc887b16759bfd9ad922230a014", + "uploaded": "2014-01-02T02:20:00Z", + "watermark": { + "uid": "6b9e68b07dfee8cc2d116e4c51d6a957", + "size": 29472, + "height": 600, + "width": 400, + "created": "2014-01-02T02:20:00Z", + "downloadedFrom": "https://company.com/logo.png", + "name": "Marketing Videos", + "opacity": 0.75, + "padding": 0.1, + "scale": 0.1, + "position": "center" + } + } } ``` @@ -114,27 +111,27 @@ curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/stream/direct_u ```json null {8} { - "success": true, - "errors": [], - "messages": [], - "result": { - "uploadURL": "www.example.com/samplepath", - "uid": "ea95132c15732412d22c1476fa83f27a", - "creator": "", - "watermark": { - "uid": "ea95132c15732412d22c1476fa83f27a", - "size": 29472, - "height": 600, - "width": 400, - "created": "2014-01-02T02:20:00Z", - "downloadedFrom": "https://company.com/logo.png", - "name": "Marketing Videos", - "opacity": 0.75, - "padding": 0.1, - "scale": 0.1, - "position": "center" - } - } + "success": true, + "errors": [], + "messages": [], + "result": { + "uploadURL": "www.example.com/samplepath", + "uid": "ea95132c15732412d22c1476fa83f27a", + "creator": "", + "watermark": { + "uid": "ea95132c15732412d22c1476fa83f27a", + "size": 29472, + "height": 600, + "width": 400, + "created": "2014-01-02T02:20:00Z", + "downloadedFrom": "https://company.com/logo.png", + "name": "Marketing Videos", + "opacity": 0.75, + "padding": 0.1, + "scale": 0.1, + "position": "center" + } + } } ``` @@ -149,67 +146,65 @@ curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/stream?after=20 ```json null {36} { - "success": true, - "errors": [], - "messages": [], - "result": [ - { - "allowedOrigins": [ - "example.com" - ], - "created": "2014-01-02T02:20:00Z", - "duration": 300, - "input": { - "height": 1080, - "width": 1920 - }, - "maxDurationSeconds": 300, - "meta": {}, - "modified": "2014-01-02T02:20:00Z", - "uploadExpiry": "2014-01-02T02:20:00Z", - "playback": { - "hls": "https://customer-.cloudflarestream.com/ea95132c15732412d22c1476fa83f27a/manifest/video.m3u8", - "dash": "https://customer-.cloudflarestream.com/ea95132c15732412d22c1476fa83f27a/manifest/video.mpd" - }, - "preview": "https://customer-.cloudflarestream.com/ea95132c15732412d22c1476fa83f27a/watch", - "readyToStream": true, - "requireSignedURLs": true, - "size": 4190963, - "status": { - "state": "ready", - "pctComplete": "100.000000", - "errorReasonCode": "", - "errorReasonText": "" - }, - "thumbnail": "https://customer-.cloudflarestream.com/ea95132c15732412d22c1476fa83f27a/thumbnails/thumbnail.jpg", - "thumbnailTimestampPct": 0.529241, - "creator": "some-creator-id", - "uid": "ea95132c15732412d22c1476fa83f27a", - "liveInput": "fc0a8dc887b16759bfd9ad922230a014", - "uploaded": "2014-01-02T02:20:00Z", - "watermark": { - "uid": "ea95132c15732412d22c1476fa83f27a", - "size": 29472, - "height": 600, - "width": 400, - "created": "2014-01-02T02:20:00Z", - "downloadedFrom": "https://company.com/logo.png", - "name": "Marketing Videos", - "opacity": 0.75, - "padding": 0.1, - "scale": 0.1, - "position": "center" - } - } - ], - "total": "35586", - "range": "1000" + "success": true, + "errors": [], + "messages": [], + "result": [ + { + "allowedOrigins": ["example.com"], + "created": "2014-01-02T02:20:00Z", + "duration": 300, + "input": { + "height": 1080, + "width": 1920 + }, + "maxDurationSeconds": 300, + "meta": {}, + "modified": "2014-01-02T02:20:00Z", + "uploadExpiry": "2014-01-02T02:20:00Z", + "playback": { + "hls": "https://customer-.cloudflarestream.com/ea95132c15732412d22c1476fa83f27a/manifest/video.m3u8", + "dash": "https://customer-.cloudflarestream.com/ea95132c15732412d22c1476fa83f27a/manifest/video.mpd" + }, + "preview": "https://customer-.cloudflarestream.com/ea95132c15732412d22c1476fa83f27a/watch", + "readyToStream": true, + "requireSignedURLs": true, + "size": 4190963, + "status": { + "state": "ready", + "pctComplete": "100.000000", + "errorReasonCode": "", + "errorReasonText": "" + }, + "thumbnail": "https://customer-.cloudflarestream.com/ea95132c15732412d22c1476fa83f27a/thumbnails/thumbnail.jpg", + "thumbnailTimestampPct": 0.529241, + "creator": "some-creator-id", + "uid": "ea95132c15732412d22c1476fa83f27a", + "liveInput": "fc0a8dc887b16759bfd9ad922230a014", + "uploaded": "2014-01-02T02:20:00Z", + "watermark": { + "uid": "ea95132c15732412d22c1476fa83f27a", + "size": 29472, + "height": 600, + "width": 400, + "created": "2014-01-02T02:20:00Z", + "downloadedFrom": "https://company.com/logo.png", + "name": "Marketing Videos", + "opacity": 0.75, + "padding": 0.1, + "scale": 0.1, + "position": "center" + } + } + ], + "total": "35586", + "range": "1000" } ``` ## tus -Add the Creator ID via the `Upload-Creator` header. For more information, refer to [Using tus](/stream/uploading-videos/direct-creator-uploads/#advanced-upload-flow-using-tus-for-large-videos). +Add the Creator ID via the `Upload-Creator` header. For more information, refer to [Resumable and large files (tus)](/stream/uploading-videos/resumable-uploads/#set-creator-property). ## Query by Creator ID with GraphQL diff --git a/src/content/docs/stream/uploading-videos/direct-creator-uploads.mdx b/src/content/docs/stream/uploading-videos/direct-creator-uploads.mdx index df8460df3cf698..6488392ed50084 100644 --- a/src/content/docs/stream/uploading-videos/direct-creator-uploads.mdx +++ b/src/content/docs/stream/uploading-videos/direct-creator-uploads.mdx @@ -17,7 +17,7 @@ In either case, you must specify a maximum duration to reserve for the user's up Use this option if your users upload videos under 200 MB, and you do not need to allow resumable uploads. -1. Generate a unique, one-time upload URL using the [Direct upload API](/api/operations/stream-videos-upload-videos-via-direct-upload-ur-ls). +1. Generate a unique, one-time upload URL using the [Direct upload API](/api/operations/stream-videos-upload-videos-via-direct-upload-ur-ls). ```sh title="Generate upload" curl https://api.cloudflare.com/client/v4/accounts/{account_id}/stream/direct_upload \ @@ -31,13 +31,13 @@ curl https://api.cloudflare.com/client/v4/accounts/{account_id}/stream/direct_up ```json output {3} { - "result": { - "uploadURL": "https://upload.videodelivery.net/f65014bc6ff5419ea86e7972a047ba22", - "uid": "f65014bc6ff5419ea86e7972a047ba22" - }, - "success": true, - "errors": [], - "messages": [] + "result": { + "uploadURL": "https://upload.videodelivery.net/f65014bc6ff5419ea86e7972a047ba22", + "uid": "f65014bc6ff5419ea86e7972a047ba22" + }, + "success": true, + "errors": [], + "messages": [] } ``` @@ -45,7 +45,7 @@ curl https://api.cloudflare.com/client/v4/accounts/{account_id}/stream/direct_up {/* */} -```bash {3} title="Upload a video to the unique one-time upload URL" +```bash {3} title="Upload a video to the unique one-time upload URL" curl --request POST \ --form file=@/Users/mickie/Downloads/example_video.mp4 \ https://upload.videodelivery.net/f65014bc6ff5419ea86e7972a047ba22 @@ -67,23 +67,23 @@ export async function onRequest(context) { const endpoint = `https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/stream?direct_user=true`; const response = await fetch(endpoint, { - method: 'POST', + method: "POST", headers: { - 'Authorization': `bearer ${CLOUDFLARE_API_TOKEN}`, - 'Tus-Resumable': '1.0.0', - 'Upload-Length': request.headers.get('Upload-Length'), - 'Upload-Metadata': request.headers.get('Upload-Metadata'), + Authorization: `bearer ${CLOUDFLARE_API_TOKEN}`, + "Tus-Resumable": "1.0.0", + "Upload-Length": request.headers.get("Upload-Length"), + "Upload-Metadata": request.headers.get("Upload-Metadata"), }, }); - const destination = response.headers.get('Location'); + const destination = response.headers.get("Location"); return new Response(null, { headers: { - 'Access-Control-Expose-Headers': 'Location', - 'Access-Control-Allow-Headers': '*', - 'Access-Control-Allow-Origin': '*', - 'Location': destination, + "Access-Control-Expose-Headers": "Location", + "Access-Control-Allow-Headers": "*", + "Access-Control-Allow-Origin": "*", + Location: destination, }, }); } @@ -94,12 +94,17 @@ export async function onRequest(context) { ```html {35} title="Upload a video using the uppy tus client" - +
- +
    @@ -109,15 +114,15 @@ export async function onRequest(context) { Tus, DragDrop, ProgressBar, - } from 'https://releases.transloadit.com/uppy/v3.0.1/uppy.min.mjs'; + } from "https://releases.transloadit.com/uppy/v3.0.1/uppy.min.mjs"; const uppy = new Uppy({ debug: true, autoProceed: true }); - const onUploadSuccess = el => (file, response) => { - const li = document.createElement('li'); - const a = document.createElement('a'); + const onUploadSuccess = (el) => (file, response) => { + const li = document.createElement("li"); + const a = document.createElement("a"); a.href = response.uploadURL; - a.target = '_blank'; + a.target = "_blank"; a.appendChild(document.createTextNode(file.name)); li.appendChild(a); @@ -125,25 +130,31 @@ export async function onRequest(context) { }; uppy - .use(DragDrop, { target: '#drag-drop-area' }) - .use(Tus, { endpoint: '/api/get-upload-url', chunkSize: 150 * 1024 * 1024 }) - .use(ProgressBar, { target: '.for-ProgressBar', hideAfterFinish: false }) - .on('upload-success', onUploadSuccess('.uploaded-files ol')); - - const uploadBtn = document.querySelector('button.upload-button'); - uploadBtn.addEventListener('click', () => uppy.upload()); + .use(DragDrop, { target: "#drag-drop-area" }) + .use(Tus, { + endpoint: "/api/get-upload-url", + chunkSize: 150 * 1024 * 1024, + }) + .use(ProgressBar, { + target: ".for-ProgressBar", + hideAfterFinish: false, + }) + .on("upload-success", onUploadSuccess(".uploaded-files ol")); + + const uploadBtn = document.querySelector("button.upload-button"); + uploadBtn.addEventListener("click", () => uppy.upload()); ``` -For more details on using tus and example client code, refer to [Resumable uploads with tus](/stream/uploading-videos/upload-video-file/#resumable-uploads-with-tus-for-large-files). +For more details on using tus and example client code, refer to [Resumable and large files (tus)](/stream/uploading-videos/resumable-uploads/). ## Upload-Metadata header syntax You can apply the [same constraints](/api/operations/stream-videos-upload-videos-via-direct-upload-ur-ls) as Direct Creator Upload via basic upload when using tus. To do so, you must pass the `expiry` and `maxDurationSeconds` as part of the `Upload-Metadata` request header as part of the first request (made by the Worker in the example above.) The `Upload-Metadata` values are ignored from subsequent requests that do the actual file upload. -The `Upload-Metadata` header should contain key-value pairs. The keys are text and the values should be encoded in base64. Separate the key and values by a space, *not* an equal sign. To join multiple key-value pairs, include a comma with no additional spaces. +The `Upload-Metadata` header should contain key-value pairs. The keys are text and the values should be encoded in base64. Separate the key and values by a space, _not_ an equal sign. To join multiple key-value pairs, include a comma with no additional spaces. In the example below, the `Upload-Metadata` header is instructing Stream to only accept uploads with max video duration of 10 minutes, uploaded prior to the expiry timestamp, and to make this video private: diff --git a/src/content/docs/workers-ai/tutorials/index.mdx b/src/content/docs/workers-ai/tutorials/index.mdx index bc7f7e55681150..50376b9ddb723a 100644 --- a/src/content/docs/workers-ai/tutorials/index.mdx +++ b/src/content/docs/workers-ai/tutorials/index.mdx @@ -4,13 +4,12 @@ title: Tutorials hideChildren: true sidebar: order: 5 - --- -import { GlossaryTooltip, ListTutorials } from "~/components" +import { GlossaryTooltip, ListTutorials } from "~/components"; :::note -[Explore our community-written tutorials contributed through the Developer Spotlight program.](/developer-spotlight/#developer-spotlight-program) +[Explore our community-written tutorials contributed through the Developer Spotlight program.](/developer-spotlight/) ::: View tutorials to help you get started with Workers AI. diff --git a/src/content/docs/workers/configuration/versions-and-deployments/gradual-deployments.mdx b/src/content/docs/workers/configuration/versions-and-deployments/gradual-deployments.mdx index 904e8685239290..2c6238874fdae5 100644 --- a/src/content/docs/workers/configuration/versions-and-deployments/gradual-deployments.mdx +++ b/src/content/docs/workers/configuration/versions-and-deployments/gradual-deployments.mdx @@ -157,7 +157,7 @@ curl -s https://$SCRIPT_NAME.$SUBDOMAIN.workers.dev -H 'Cloudflare-Workers-Versi The dictionary can contain multiple key-value pairs. Each key indicates the name of the Worker the override should be applied to. The value indicates the version ID that should be used and must be a [String](https://www.rfc-editor.org/rfc/rfc8941#name-strings). -A version override will only be applied if the specified version is in the current deployment. The versions in the current deployment can be found using the [`wrangler deployments list`](/workers/wrangler/commands/#list#TODO) command or on the [Workers Dashboard](https://dash.cloudflare.com/?to=/:account/workers) under Worker > Deployments > Active Deployment. +A version override will only be applied if the specified version is in the current deployment. The versions in the current deployment can be found using the [`wrangler deployments list`](/workers/wrangler/commands/#list-6) command or on the [Workers Dashboard](https://dash.cloudflare.com/?to=/:account/workers) under Worker > Deployments > Active Deployment. :::note[Verifying that the version override was applied] diff --git a/src/content/docs/workers/examples/index.mdx b/src/content/docs/workers/examples/index.mdx index c0392ea341dfc7..d9d3b9628e6026 100644 --- a/src/content/docs/workers/examples/index.mdx +++ b/src/content/docs/workers/examples/index.mdx @@ -10,7 +10,7 @@ sidebar: import { GlossaryTooltip, ListExamples } from "~/components"; :::note -[Explore our community-written tutorials contributed through the Developer Spotlight program.](/developer-spotlight/#developer-spotlight-program) +[Explore our community-written tutorials contributed through the Developer Spotlight program.](/developer-spotlight/) ::: Explore the following examples for Workers. diff --git a/src/content/docs/workers/observability/errors.mdx b/src/content/docs/workers/observability/errors.mdx index 321e299080bd7e..13ac47b80d3558 100644 --- a/src/content/docs/workers/observability/errors.mdx +++ b/src/content/docs/workers/observability/errors.mdx @@ -3,10 +3,9 @@ pcx_content_type: concept title: Errors and exceptions head: [] description: Review Workers errors and exceptions. - --- -import { TabItem, Tabs } from "~/components" +import { TabItem, Tabs } from "~/components"; Review Workers errors and exceptions. @@ -31,7 +30,7 @@ Other `11xx` errors generally indicate a problem with the Workers runtime itself ### Loop limit -A Worker cannot call itself or another Worker more than 16 times. In order to prevent infinite loops between Workers, the [`CF-EW-Via`](/fundamentals/reference/http-request-headers/#cf-ew-via) header's value is an integer that indicates how many invocations are left. Every time a Worker is invoked, the integer will decrement by 1. If the count reaches zero, a [`1019`](#error-pages-generated-by-workers) error is returned. +A Worker cannot call itself or another Worker more than 16 times. In order to prevent infinite loops between Workers, the [`CF-EW-Via`](/fundamentals/reference/http-request-headers/#cf-ew-via) header's value is an integer that indicates how many invocations are left. Every time a Worker is invoked, the integer will decrement by 1. If the count reaches zero, a [`1019`](#error-pages-generated-by-workers) error is returned. ### "The script will never generate a response" errors @@ -47,17 +46,17 @@ In the example below, the Response relies on a Promise resolution that never hap ```js null {9} export default { - fetch(req) { - let response = new Response("Example response"); - let { promise, resolve } = Promise.withResolvers(); + fetch(req) { + let response = new Response("Example response"); + let { promise, resolve } = Promise.withResolvers(); - // If the promise is not resolved, the Workers runtime will - // recognize this and throw an error. + // If the promise is not resolved, the Workers runtime will + // recognize this and throw an error. - // setTimeout(resolve, 0) + // setTimeout(resolve, 0) - return promise.then(() => response); - }, + return promise.then(() => response); + }, }; ``` @@ -67,21 +66,20 @@ If a WebSocket is missing the proper code to close its server-side connection, t ```js null {10} async function handleRequest(request) { - let webSocketPair = new WebSocketPair(); - let [client, server] = Object.values(webSocketPair); - server.accept(); - - server.addEventListener('close', () => { - // This missing line would keep a WebSocket connection open indefinitely - // and results in "The script will never generate a response" errors - - // server.close(); - }); - - return new Response(null, { - status: 101, - webSocket: client, - }); + let webSocketPair = new WebSocketPair(); + let [client, server] = Object.values(webSocketPair); + server.accept(); + + server.addEventListener("close", () => { + // This missing line would keep a WebSocket connection open indefinitely + // and results in "The script will never generate a response" errors + // server.close(); + }); + + return new Response(null, { + status: 101, + webSocket: client, + }); } ``` @@ -99,15 +97,15 @@ The following code will error: ```js export default { - async fetch(request, env, ctx) { - // destructuring ctx makes waitUntil lose its 'this' reference - const { waitUntil } = ctx; - // waitUntil errors, as it has no 'this' - waitUntil(somePromise); - - return fetch(request); - } -} + async fetch(request, env, ctx) { + // destructuring ctx makes waitUntil lose its 'this' reference + const { waitUntil } = ctx; + // waitUntil errors, as it has no 'this' + waitUntil(somePromise); + + return fetch(request); + }, +}; ``` Avoid destructuring or re-bind the function to the original context to avoid the error. @@ -116,20 +114,20 @@ The following code will run properly: ```js export default { - async fetch(request, env, ctx) { - // directly calling the method on ctx avoids the error - ctx.waitUntil(somePromise); - - // alternatively re-binding to ctx via apply, call, or bind avoids the error - const { waitUntil } = ctx; - waitUntil.apply(ctx, [somePromise]); - waitUntil.call(ctx, somePromise); - const reboundWaitUntil = waitUntil.bind(ctx); - reboundWaitUntil(somePromise); - - return fetch(request); - } -} + async fetch(request, env, ctx) { + // directly calling the method on ctx avoids the error + ctx.waitUntil(somePromise); + + // alternatively re-binding to ctx via apply, call, or bind avoids the error + const { waitUntil } = ctx; + waitUntil.apply(ctx, [somePromise]); + waitUntil.call(ctx, somePromise); + const reboundWaitUntil = waitUntil.bind(ctx); + reboundWaitUntil(somePromise); + + return fetch(request); + }, +}; ``` ## Errors on Worker upload @@ -150,7 +148,7 @@ These errors occur when a Worker is uploaded or modified. | `10052` | A [binding](/workers/runtime-apis/bindings/) is uploaded without a name. | | `10054` | A environment variable or secret exceeds the [size limit](/workers/platform/limits/#environment-variables). | | `10055` | The number of environment variables or secrets exceeds the [limit/Worker](/workers/platform/limits/#environment-variables). | -| `10056` | [Binding](/workers/runtime-apis/bindings/) not found. | +| `10056` | [Binding](/workers/runtime-apis/bindings/) not found. | | `10068` | The uploaded Worker has no registered [event handlers](/workers/runtime-apis/handlers/). | | `10069` | The uploaded Worker contains [event handlers](/workers/runtime-apis/handlers/) unsupported by the Workers runtime. | @@ -166,7 +164,7 @@ A Worker can be up to 10 MB in size after compression on the Workers Paid plan, To reduce the upload size of a Worker, you should consider removing unnecessary dependencies and/or using Workers KV, a D1 database or R2 to store configuration files, static assets and binary data instead of attempting to bundle them within your Worker code. -Another method to reduce a Worker's filzesize is to split its functionality across multiple Workers and connect them using [Service bindings](/workers/runtime-apis/bindings/service-bindings/#service-bindings). +Another method to reduce a Worker's file size is to split its functionality across multiple Workers and connect them using [Service bindings](/workers/runtime-apis/bindings/service-bindings/). #### Script startup exceeded CPU time limit @@ -214,41 +212,41 @@ When using an external logging strategy, remember that outstanding asynchronous ```js export default { - async fetch(request, env, ctx) { - function postLog(data) { - return fetch("https://log-service.example.com/", { - method: "POST", - body: data, - }); - } - - // Without ctx.waitUntil(), the `postLog` function may or may not complete. - ctx.waitUntil(postLog(stack)); - return fetch(request); - } -} + async fetch(request, env, ctx) { + function postLog(data) { + return fetch("https://log-service.example.com/", { + method: "POST", + body: data, + }); + } + + // Without ctx.waitUntil(), the `postLog` function may or may not complete. + ctx.waitUntil(postLog(stack)); + return fetch(request); + }, +}; ``` ```js addEventListener("fetch", (event) => { - event.respondWith(handleEvent(event)); + event.respondWith(handleEvent(event)); }); async function handleEvent(event) { - // ... + // ... - // Without event.waitUntil(), the `postLog` function may or may not complete. - event.waitUntil(postLog(stack)); - return fetch(event.request); + // Without event.waitUntil(), the `postLog` function may or may not complete. + event.waitUntil(postLog(stack)); + return fetch(event.request); } function postLog(data) { - return fetch("https://log-service.example.com/", { - method: "POST", - body: data, - }); + return fetch("https://log-service.example.com/", { + method: "POST", + body: data, + }); } ``` @@ -262,26 +260,26 @@ By using [`event.passThroughOnException`](/workers/runtime-apis/context/#passthr ```js export default { - async fetch(request, env, ctx) { - ctx.passThroughOnException(); - // an error here will return the origin response, as if the Worker wasn't present - return fetch(request); - } -} + async fetch(request, env, ctx) { + ctx.passThroughOnException(); + // an error here will return the origin response, as if the Worker wasn't present + return fetch(request); + }, +}; ``` ```js addEventListener("fetch", (event) => { - event.passThroughOnException(); - event.respondWith(handleRequest(event.request)); + event.passThroughOnException(); + event.respondWith(handleRequest(event.request)); }); async function handleRequest(request) { - // An error here will return the origin response, as if the Worker wasn’t present. - // ... - return fetch(request); + // An error here will return the origin response, as if the Worker wasn’t present. + // ... + return fetch(request); } ``` @@ -289,6 +287,6 @@ async function handleRequest(request) { ## Related resources -* [Log from Workers](/workers/observability/logging/) - Learn how to log your Workers. -* [Logpush](/workers/observability/logging/logpush/) - Learn how to push Workers Trace Event Logs to supported destinations. -* [RPC error handling](/workers/runtime-apis/rpc/error-handling/) - Learn how to handle errors from remote-procedure calls. +- [Log from Workers](/workers/observability/logging/) - Learn how to log your Workers. +- [Logpush](/workers/observability/logging/logpush/) - Learn how to push Workers Trace Event Logs to supported destinations. +- [RPC error handling](/workers/runtime-apis/rpc/error-handling/) - Learn how to handle errors from remote-procedure calls. diff --git a/src/content/docs/workers/tutorials/index.mdx b/src/content/docs/workers/tutorials/index.mdx index 500870958231e5..245c739fe0f97d 100644 --- a/src/content/docs/workers/tutorials/index.mdx +++ b/src/content/docs/workers/tutorials/index.mdx @@ -5,13 +5,12 @@ pcx_content_type: navigation title: Tutorials sidebar: order: 4 - --- -import { GlossaryTooltip, ListTutorials } from "~/components" +import { GlossaryTooltip, ListTutorials } from "~/components"; :::note -[Explore our community-written tutorials contributed through the Developer Spotlight program.](/developer-spotlight/#developer-spotlight-program) +[Explore our community-written tutorials contributed through the Developer Spotlight program.](/developer-spotlight/) ::: View tutorials to help you get started with Workers. diff --git a/src/content/glossary/cloudflare-one.yaml b/src/content/glossary/cloudflare-one.yaml index e9121f40ae4fe9..cc3d3f7508cba5 100644 --- a/src/content/glossary/cloudflare-one.yaml +++ b/src/content/glossary/cloudflare-one.yaml @@ -215,7 +215,7 @@ entries: | --------------------------------------- | ---------------- | | `.cloudflareaccess.com` | `your-team-name` | - To learn about the consequences of changing your team name, refer to the [FAQ](/cloudflare-one/faq/teams-getting-started-faq/#whats-a-team-domain/team-name). + To learn about the consequences of changing your team name, refer to the [FAQ](/cloudflare-one/faq/teams-getting-started-faq/#whats-a-team-domainteam-name). - term: Terraform general_definition: |- diff --git a/src/content/partials/version-management/product-limitations.mdx b/src/content/partials/version-management/product-limitations.mdx index 2c91147ea04f6d..7e438a84a3284b 100644 --- a/src/content/partials/version-management/product-limitations.mdx +++ b/src/content/partials/version-management/product-limitations.mdx @@ -66,7 +66,7 @@ Version Management does not currently support or have limited support for the fo
    -- Changes made to [Image Transformations](/images/transform-images/#transform-images) are not cloned when a new zone version is created. +- Changes made to [Image Transformations](/images/transform-images/) are not cloned when a new zone version is created.