You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -14,11 +14,15 @@ Protect supports various running modes for different needs and purposes.
14
14
*`validate` runs as a CLI tool, validating your Persisted Operations against your schema and configured protections (see [this page](configuration.md#graphql-protect---validate-run-mode) for more info how to set this up)
15
15
*`version` outputs versioning info of protect
16
16
17
+
## HTTP configuration
18
+
19
+
*[HTTP Configuration](http.md)
20
+
*
17
21
## Protections
18
22
19
23
This section contains all the documentation about each protection feature.
Copy file name to clipboardExpand all lines: docs/configuration.md
+12-26Lines changed: 12 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -12,22 +12,32 @@ The following outlines the structure of the yaml, as well as outlines the **defa
12
12
13
13
```yaml
14
14
web:
15
+
# Maximum duration to read the entire request
15
16
read_timeout: 5s
17
+
# Maximum duration before timing out writes of the response
16
18
write_timeout: 10s
19
+
# Maximum time to wait between idle requests for keep alive
17
20
idle_timeout: 120s
21
+
# Time to wait until forcibly shutting down protect, after receiving a shutdown signal
18
22
shutdown_timeout: 20s
23
+
# host and port to listen on
19
24
host: 0.0.0.0:8080
25
+
# path that receives GraphQL traffic
20
26
path: /graphql
21
27
# limit the maximum size of a request body that is allowed
22
28
# this helps prevent OOM attacks through excessively large request payloads.
23
29
# A limit of `0` disables this protection.
24
30
request_body_max_bytes: 102400
25
31
26
32
target:
33
+
# Target host and port to send traffic to after validating
27
34
host: http://localhost:8081
35
+
# Dial timeout waiting for a connection to complete with the target upstream
28
36
timeout: 10s
37
+
# Interval of keep alive probes
29
38
keep_alive: 180s
30
-
target:
39
+
tracing:
40
+
# Headers to redact when sending tracing information
31
41
redacted_headers: []
32
42
33
43
schema:
@@ -170,28 +180,4 @@ max_batch:
170
180
enabled: true
171
181
# The maximum number of operations within a single batched request.
172
182
max: 5
173
-
```
174
-
175
-
## HTTP Request Body Max Byte size
176
-
177
-
To prevent OOM attacks through excessively large request bodies, a default limit is posed on request body size of `100kb`. This limit is generally speaking ample space for GraphQL request bodies, while also providing solid protections.
178
-
179
-
You can modify this limit by changing the following configuration option
180
-
181
-
```yaml
182
-
web:
183
-
# limit the maximum size of a request body that is allowed
184
-
# this helps prevent OOM attacks through excessively large request payloads.
185
-
# A limit of `0` disables this protection.
186
-
request_body_max_bytes: 102400
187
-
```
188
-
189
-
### Metrics
190
-
191
-
A metric is exposed to track if and when a request is rejected that exceeds this limit.
# Maximum duration before timing out writes of the response
10
+
write_timeout: 10s
11
+
# Maximum time to wait between idle requests for keep alive
12
+
idle_timeout: 120s
13
+
# Time to wait until forcibly shutting down protect, after receiving a shutdown signal
14
+
shutdown_timeout: 20s
15
+
# host and port to listen on
16
+
host: 0.0.0.0:8080
17
+
# path that receives GraphQL traffic
18
+
path: /graphql
19
+
# limit the maximum size of a request body that is allowed
20
+
# this helps prevent OOM attacks through excessively large request payloads.
21
+
# A limit of `0` disables this protection.
22
+
request_body_max_bytes: 102400
23
+
24
+
target:
25
+
# Target host and port to send traffic to after validating
26
+
host: http://localhost:8081
27
+
# Dial timeout waiting for a connection to complete with the target upstream
28
+
timeout: 10s
29
+
# Interval of keep alive probes
30
+
keep_alive: 180s
31
+
tracing:
32
+
# Headers to redact when sending tracing information
33
+
redacted_headers: []
34
+
```
35
+
36
+
## HTTP Request Body Max Byte size
37
+
38
+
To prevent OOM attacks through excessively large request bodies, a default limit is posed on request body size of `100kb`. This limit is generally speaking ample space for GraphQL request bodies, while also providing solid protections.
39
+
40
+
You can modify this limit by changing the following configuration option
41
+
42
+
```yaml
43
+
web:
44
+
# limit the maximum size of a request body that is allowed
45
+
# this helps prevent OOM attacks through excessively large request payloads.
46
+
# A limit of `0` disables this protection.
47
+
request_body_max_bytes: 102400
48
+
```
49
+
50
+
### Metrics
51
+
52
+
A metric is exposed to track if and when a request is rejected that exceeds this limit.
0 commit comments