$ cat <<EOF > custom-body-size-env.lua
io.output("/opt/app-root/src/apicast.d/body_size.conf")
io.write("client_body_buffer_size 2m;\n", "client_max_body_size 2m;\n")
io.close()
EOF$ oc create secret generic custom-body-size-env --from-file=./custom-body-size-env.luaspec:
customEnvironments:
- secretRef:
name: custom-body-size-env$ oc delete secret custom-body-size-env --ignore-not-found=true; \
oc create secret generic custom-body-size-env --from-file=./custom-body-size-env.lua; \
oc delete pod -l deployment=apicast-redhat-teste-staging $ dd if=/dev/urandom of=./payload-3M.txt bs=3M count=1;$ curl -k -i -X POST $API -H "Content-Type: text/xml" --data-binary "@payload-3M.txt"
HTTP/2 413
server: openresty
date: Wed, 21 Sep 2022 19:12:41 GMT
content-type: text/html
content-length: 180
<html>
<head><title>413 Request Entity Too Large</title></head>
<body>
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>openresty</center>
</body>
</html>