From ca2eaa02ccff7b7800f3d69fc9d04d0834b994e2 Mon Sep 17 00:00:00 2001 From: ControlCplusControlV <44706811+ControlCplusControlV@users.noreply.github.com> Date: Fri, 23 Dec 2022 16:56:32 -0700 Subject: [PATCH] Fix Request Body Size Limit (#869) * fixed request body limits * fixed a feature flag * change coin owner for preview chainspec * remove duplicate default logic Co-authored-by: Voxelot <brandonkite92@gmail.com> --- deployment/ingress/eks/fuel-core-ingress.yaml | 2 ++ deployment/scripts/chainspec/dev_chainspec.json | 2 +- fuel-core/src/service/graph_api.rs | 8 ++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/deployment/ingress/eks/fuel-core-ingress.yaml b/deployment/ingress/eks/fuel-core-ingress.yaml index 96cf3675e2f..4c033f353b9 100644 --- a/deployment/ingress/eks/fuel-core-ingress.yaml +++ b/deployment/ingress/eks/fuel-core-ingress.yaml @@ -4,6 +4,8 @@ metadata: name: ${k8s_namespace}-ingress namespace: ${k8s_namespace} annotations: + nginx.ingress.kubernetes.io/proxy-body-size: "7m" + nginx.org/client-max-body-size: "7m" nginx.ingress.kubernetes.io/ssl-redirect: "false" nginx.ingress.kubernetes.io/force-ssl-redirect: "false" nginx.ingress.kubernetes.io/rewrite-target: / diff --git a/deployment/scripts/chainspec/dev_chainspec.json b/deployment/scripts/chainspec/dev_chainspec.json index e84b071c345..29351646f7d 100644 --- a/deployment/scripts/chainspec/dev_chainspec.json +++ b/deployment/scripts/chainspec/dev_chainspec.json @@ -9,7 +9,7 @@ "initial_state": { "coins": [ { - "owner": "0xf1e92c42b90934aa6372e30bc568a326f6e66a1a0288595e6e3fbd392a4f3e6e", + "owner": "0x53a9c6a74bee79c5e04115a007984f4bddaafed75f512f68766c6ed59d0aedec", "amount": "0x04000000000000", "asset_id": "0x0000000000000000000000000000000000000000000000000000000000000000" } diff --git a/fuel-core/src/service/graph_api.rs b/fuel-core/src/service/graph_api.rs index 8e7f4b4bdaa..1ef57dc3e39 100644 --- a/fuel-core/src/service/graph_api.rs +++ b/fuel-core/src/service/graph_api.rs @@ -22,7 +22,10 @@ use async_graphql::{ Response, }; use axum::{ - extract::Extension, + extract::{ + DefaultBodyLimit, + Extension, + }, http::{ header::{ ACCESS_CONTROL_ALLOW_HEADERS, @@ -102,7 +105,8 @@ pub async fn start_server( .layer(SetResponseHeaderLayer::<_>::overriding( ACCESS_CONTROL_ALLOW_HEADERS, HeaderValue::from_static("*"), - )); + )) + .layer(DefaultBodyLimit::disable()); let (tx, rx) = tokio::sync::oneshot::channel(); let listener = TcpListener::bind(network_addr)?;