Skip to content

Commit 2a457cf

Browse files
authored
[Docs] Fix build warnings (#26081)
1 parent 67ab0b4 commit 2a457cf

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

src/content/docs/cache/advanced-configuration/serve-tailored-content.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ In this example, you run an A/B test controlled by a cookie named `ab-test` (wit
8888
2. Select **Create new Snippet** and name it `ab-test-caching`.
8989
3. Paste the following code. It modifies the cache key based on the `ab-test` cookie and caches the response for 30 days.
9090

91-
```JavaScript
91+
```js
9292
const CACHE_DURATION = 30 * 24 * 60 * 60; // 30 days
9393

9494
export default {
@@ -166,7 +166,7 @@ For complex caching scenarios, [Cloudflare Workers](/cache/interaction-cloudflar
166166
167167
This Worker detects whether a visitor is on a mobile or desktop device and creates separate cache entries for each, ensuring the correct version of the site is served and cached.
168168
169-
```JavaScript
169+
```js
170170
export default {
171171
async fetch(request, env, ctx) {
172172
const userAgent = request.headers.get('User-Agent') || '';
@@ -201,7 +201,7 @@ Free and Paid plans
201201
202202
This Worker detects if a visitor is on a mobile device or a desktop and creates a separate cache entry for each, ensuring the correct version of the site is served and cached. Uses the Enterprise `cf.customCacheKey` feature.
203203
204-
```JavaScript
204+
```js
205205
export default {
206206
async fetch(request) {
207207
// 1. Determine the device type from the User-Agent header

src/content/docs/speed/optimization/protocol/http2-to-origin.mdx

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
---
22
pcx_content_type: how-to
33
title: HTTP/2 to Origin
4-
54
---
65

7-
import { FeatureTable, Details, Render, APIRequest, Dashboard, DashButton } from "~/components"
6+
import {
7+
FeatureTable,
8+
Details,
9+
Render,
10+
APIRequest,
11+
DashButton,
12+
} from "~/components";
813

914
A protocol is a set of rules governing the exchange or transmission of data between devices. One of the most important protocols that run on the human-computer interaction layer, where applications can access the network services, is HTTP (Hypertext Transfer Protocol).
1015

@@ -24,7 +29,7 @@ If you wish to disable HTTP/2 to Origin, you can follow these steps:
2429

2530
<DashButton url="/?to=/:account/:zone/speed/optimization" />
2631

27-
4. Go to the **Protocol Optimization** tab and under **HTTP/2 to Origin** set the toggle to **Off**.
32+
2. Go to the **Protocol Optimization** tab and under **HTTP/2 to Origin** set the toggle to **Off**.
2833

2934
## Connection multiplexing
3035

@@ -39,21 +44,21 @@ Connection multiplexing is enabled by default on Free, Pro and Business zones an
3944
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/login) and select your account.
4045
2. Choose the domain that will use HTTP/2 to Origin.
4146
3. Select **Speed > Optimization**.
42-
4. Open the **Protocol Optimization** tab.
47+
4. Open the **Protocol Optimization** tab.
4348
5. Under **HTTP/2 to Origin**, select **Configure** and adjust the stream settings as needed.
4449

4550
</Details>
4651

4752
<Details header="API">
4853

4954
<APIRequest
50-
path="/zones/{zone_id}/settings/origin_h2_max_streams"
51-
method="PATCH"
52-
json={{
53-
value: 100
54-
}}
55+
path="/zones/{zone_id}/settings/origin_h2_max_streams"
56+
method="PATCH"
57+
json={{
58+
value: 100,
59+
}}
5560
/>
56-
61+
5762
Refer to the [API documentation](/api/python/resources/zones/subresources/settings/methods/edit/) for more information.
5863

5964
</Details>

0 commit comments

Comments
 (0)