Skip to content

Commit

Permalink
Fix Request Body Size Limit (#869)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
ControlCplusControlV and Voxelot committed Jan 17, 2023
1 parent 63e209c commit ca2eaa0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions deployment/ingress/eks/fuel-core-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: /
Expand Down
2 changes: 1 addition & 1 deletion deployment/scripts/chainspec/dev_chainspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"initial_state": {
"coins": [
{
"owner": "0xf1e92c42b90934aa6372e30bc568a326f6e66a1a0288595e6e3fbd392a4f3e6e",
"owner": "0x53a9c6a74bee79c5e04115a007984f4bddaafed75f512f68766c6ed59d0aedec",
"amount": "0x04000000000000",
"asset_id": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
Expand Down
8 changes: 6 additions & 2 deletions fuel-core/src/service/graph_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ use async_graphql::{
Response,
};
use axum::{
extract::Extension,
extract::{
DefaultBodyLimit,
Extension,
},
http::{
header::{
ACCESS_CONTROL_ALLOW_HEADERS,
Expand Down Expand Up @@ -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)?;
Expand Down

0 comments on commit ca2eaa0

Please sign in to comment.