Skip to content

Commit fb3e20e

Browse files
nenizerapedrosousa
andauthored
[Speed] Update disable-auto-minify.mdx (#18295)
--------- Co-authored-by: Pedro Sousa <[email protected]>
1 parent 1028893 commit fb3e20e

File tree

1 file changed

+43
-55
lines changed

1 file changed

+43
-55
lines changed
Lines changed: 43 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,66 @@
11
---
22
pcx_content_type: troubleshooting
3-
title: Disable Auto Minify
3+
title: Turn off Auto Minify via API
4+
sidebar:
5+
label: Turn off Auto Minify
46
---
57

6-
If your site is still using deprecated features for [Auto Minify](/fundamentals/api/reference/deprecations/#auto-minify), disable Auto Minify via the Cloudflare dashboard or API.
8+
If your site is still using deprecated features for [Auto Minify](/fundamentals/api/reference/deprecations/#2024-08-05), turn off Auto Minify via API.
79

8-
## Dashboard
10+
## Before you begin
911

10-
To disable Auto Minify via the Cloudflare dashboard:
12+
You will need an [API token](/fundamentals/api/get-started/create-token/) with the following permissions:
1113

12-
1. Log into the [Cloudflare Dashboard](https://dash.cloudflare.com).
13-
2. Go to **Speed** > **Optimization**.
14-
3. Go to **Content Optimization**.
15-
4. For **Auto Minify**, deselect all options.
14+
- _Zone_ > _Zone Settings_ > _Edit_
15+
- _Zone_ > _Zone Settings_ > _Read_
1616

17-
## API
17+
## (Optional) Check zone status
1818

19-
### Before you begin
19+
To check your zone's Auto Minify status, send a `GET` request to the `/zones/{zone_id}/settings/minify` endpoint.
2020

21-
You will need:
22-
23-
- An [API token](/fundamentals/api/get-started/create-token/) with the following permissions:
24-
- `Zone - Zone Settings - Edit`
25-
- `Zone - Zone Settings - Read`
26-
27-
### (Optional) Check zone status
28-
29-
To check your zone's Auto Minify status, send a `GET` request to the `/zones/<ZONE_ID>/settings/minify` endpoint.
30-
31-
```sh title="cURL example"
32-
curl 'https://api.cloudflare.com/client/v4/zones/<ZONE_ID>/settings/minify' \
33-
--header "Authorization: Bearer <CF_API_TOKEN>" \
34-
--header "Content-Type: application/json"
21+
```bash
22+
curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/settings/minify" \
23+
--header "Authorization: Bearer <API_TOKEN>"
3524
```
3625

37-
You will get the following response. If any of the values in the highlighted line are `"on"`, then you need to disable them.
38-
39-
```json title="Example response" {4}
26+
```json output {4}
4027
{
41-
"result": {
42-
"id": "minify",
43-
"value": { "css": "off", "html": "off", "js": "off" },
44-
"modified_on": null,
45-
"editable": true
46-
},
47-
"success": true,
48-
"errors": [],
49-
"messages": []
28+
"result": {
29+
"id": "minify",
30+
"value": { "css": "off", "html": "off", "js": "off" },
31+
"modified_on": null,
32+
"editable": true
33+
},
34+
"success": true,
35+
"errors": [],
36+
"messages": []
5037
}
5138
```
5239

53-
### Disable with the API
40+
If any of the values in the highlighted line are `"on"`, then you need to turn them off.
5441

55-
To disable Auto Minify for your zone, send a `PATCH` request to the `/zones/<ZONE_ID>/settings/minify` endpoint.
42+
## Turn off Auto Minify using the API
5643

57-
```sh title="cURL example"
58-
curl -X PATCH 'https://api.cloudflare.com/client/v4/zones/<ZONE_ID>/settings/minify' \
59-
--header "Authorization: Bearer <CF_API_TOKEN>" \
60-
--header "Content-Type: application/json" \
61-
-d '{"value":{"css":"off","html":"off","js":"off"}}'
62-
```
44+
To turn off Auto Minify for your zone, send a `PATCH` request to the `/zones/{zone_id}/settings/minify` endpoint. The value for `success` in the response should be `true`.
6345

64-
If successful, you will get something similar to this response. The value for `success` should be `true`.
46+
```bash
47+
curl --request PATCH \
48+
"https://api.cloudflare.com/client/v4/zones/{zone_id}/settings/minify" \
49+
--header "Authorization: Bearer <API_TOKEN>" \
50+
--header "Content-Type: application/json" \
51+
--data '{ "value": { "css": "off","html": "off","js": "off" } }'
52+
```
6553

66-
```json title="Example disabled response" {8}
54+
```json output {8}
6755
{
68-
"result": {
69-
"id": "minify",
70-
"value": { "js": "off", "css": "off", "html": "off" },
71-
"modified_on": "2024-08-15T19:32:20.882640Z",
72-
"editable": true
73-
},
74-
"success": true,
75-
"errors": [],
76-
"messages": []
56+
"result": {
57+
"id": "minify",
58+
"value": { "js": "off", "css": "off", "html": "off" },
59+
"modified_on": "2024-11-15T19:32:20.882640Z",
60+
"editable": true
61+
},
62+
"success": true,
63+
"errors": [],
64+
"messages": []
7765
}
7866
```

0 commit comments

Comments
 (0)