Skip to content

Commit eee56ff

Browse files
Apply docs suggestions
Co-authored-by: Alan Dooley <github@adubhlaoi.ch>
1 parent 5c1bb13 commit eee56ff

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

site/content/how-to/monitoring/troubleshooting.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ If you receive the following error:
5252
</html>
5353
```
5454

55-
or see the following error message in the NGINX logs:
55+
Or view the following error message in the NGINX logs:
5656

5757
```text
5858
2024/05/30 21:48:22 [error] 138#138: *43 client intended to send too large body: 112 bytes, client: 127.0.0.1, server: cafe.example.com, request: "POST /coffee HTTP/1.1", host: "cafe.example.com:8080"
5959
```
6060

61-
the request body exceeds the [client_max_body_size](https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size).
61+
The request body exceeds the [client_max_body_size](https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size).
6262

6363
#### Resolution
6464

65-
You can configure the `client_max_body_size` using the `ClientSettingsPolicy` API. See this [guide]({{< relref "how-to/traffic-management/client-settings.md" >}}) for instructions.
65+
You can configure the `client_max_body_size` using the `ClientSettingsPolicy` API. Read the [Client Settings Policy]({{< relref "how-to/traffic-management/client-settings.md" >}}) documentation for more information.

site/content/how-to/traffic-management/client-settings.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ This guide will show you how to use the `ClientSettingsPolicy` API to configure
6262

6363
- Test the configuration:
6464

65-
We can send traffic to the coffee and tea applications using the external IP address and port for NGINX Gateway Fabric.
65+
You can send traffic to the coffee and tea applications using the external IP address and port for NGINX Gateway Fabric.
6666

6767
{{< note >}}If you have a DNS record allocated for `cafe.example.com`, you can send the request directly to that hostname, without needing to resolve.{{< /note >}}
6868

@@ -96,7 +96,7 @@ This guide will show you how to use the `ClientSettingsPolicy` API to configure
9696

9797
### Set a default client max body size for the Gateway
9898

99-
To set a default client max body size for the Gateway we created in the setup, create the following `ClientSettingsPolicy`:
99+
To set a default client max body size for the Gateway created during setup, add the following `ClientSettingsPolicy`:
100100

101101
```yaml
102102
kubectl apply -f - <<EOF
@@ -117,7 +117,7 @@ EOF
117117
This `ClientSettingsPolicy` targets the Gateway we created in the setup by specifying it in the `targetRef` field. It limits the max client body size to 50 bytes.
118118
Since this policy is applied to the Gateway, it will affect all HTTPRoutes and GRPCRoutes attached to the Gateway. All requests to the coffee and tea applications must have a request body of less than or equal to 50 bytes.
119119

120-
Let's verify that the `ClientSettingsPolicy` is Accepted:
120+
Verify that the `ClientSettingsPolicy` is Accepted:
121121

122122
```shell
123123
kubectl describe clientsettingspolicies.gateway.nginx.org gateway-client-settings
@@ -144,7 +144,7 @@ Status:
144144
Events: <none>
145145
```
146146

147-
Next, let's test that the policy is configured by sending a POST request to the coffee and tea applications exceeding the client's max body size of 50 bytes.
147+
Next, test that the policy is configured by sending a POST request to the coffee and tea applications exceeding the client's max body size of 50 bytes.
148148

149149

150150
```shell
@@ -163,13 +163,13 @@ You should receive the following error:
163163
</html>
164164
```
165165

166-
Now, let's try again with a payload that's less than the 50 byte limit:
166+
Try again with a payload that's less than the 50 byte limit:
167167

168168
```shell
169169
curl --resolve cafe.example.com:$GW_PORT:$GW_IP http://cafe.example.com:$GW_PORT/coffee -X POST --data "this payload is under fifty bytes"
170170
```
171171

172-
This time, we should receive a response from coffee:
172+
This time, you should receive a response from coffee:
173173

174174
```text
175175
Server address: 10.244.0.6:8080
@@ -201,7 +201,7 @@ EOF
201201
This `ClientSettingsPolicy` targets the tea HTTPRoute we created in the setup by specifying it in the `targetRef` field. It sets the max client body size to 75 bytes.
202202
Since this policy is applied to the tea HTTPRoute, it will only affect the tea HTTPRoute, and the `ClientSettingsPolicy` we created in the previous step will affect all other routes attached to the Gateway. This means that the coffee app still has a client max body size of 50 bytes, and the tea app has a max body size of 75.
203203

204-
Let's verify that the `ClientSettingsPolicy` is Accepted:
204+
Verify that the `ClientSettingsPolicy` is Accepted:
205205

206206
```shell
207207
kubectl describe clientsettingspolicies.gateway.nginx.org tea-client-settings
@@ -230,7 +230,7 @@ Events: <none>
230230

231231
Notice that the Ancestor Ref in the status is the tea HTTPRoute instead of the Gateway.
232232

233-
Next, let's test that the policy is configured by sending a POST request to the tea application with a request body size greater than 50 bytes.
233+
Next, test that the policy is configured by sending a POST request to the tea application with a request body size greater than 50 bytes.
234234

235235
```shell
236236
curl --resolve cafe.example.com:$GW_PORT:$GW_IP http://cafe.example.com:$GW_PORT/tea -X POST --data "this payload is greater than fifty bytes but less than seventy five"
@@ -259,7 +259,7 @@ curl --resolve cafe.example.com:$GW_PORT:$GW_IP http://cafe.example.com:$GW_PORT
259259
</html>
260260
```
261261

262-
If you want to configure a `ClientSettingsPolicy` for a GRPCRoute, you can specify the GRPCRoute in the `spec.targetRef`:
262+
To configure a `ClientSettingsPolicy` for a GRPCRoute, you can specify the GRPCRoute in the `spec.targetRef`:
263263

264264
```yaml
265265
kubectl apply -f - <<EOF

0 commit comments

Comments
 (0)