Skip to content

Commit 264ef8d

Browse files
Remove read body limit, apply json parsing to specific content types
Signed-off-by: Hayden <[email protected]>
1 parent 7a4ed79 commit 264ef8d

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

gcp/modules/tiles_tlog/network.tf

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ resource "google_compute_security_policy" "k8s_http_grpc_security_policy" {
167167

168168
advanced_options_config {
169169
json_parsing = "STANDARD"
170+
json_custom_config {
171+
content_types = ["application/json", "application/json; charset=utf-8"]
172+
}
170173
}
171174

172175
adaptive_protection_config {
@@ -245,18 +248,6 @@ resource "google_compute_security_policy" "bucket_security_policy" {
245248
project = var.project_id
246249
type = "CLOUD_ARMOR_EDGE"
247250

248-
rule {
249-
action = "deny(502)"
250-
priority = "1"
251-
252-
match {
253-
expr {
254-
expression = "int(request.headers['content-length']) > 1024"
255-
}
256-
}
257-
description = "Block all incoming read requests > 1KiB"
258-
}
259-
260251
rule {
261252
action = "throttle"
262253
priority = "10"

0 commit comments

Comments
 (0)