I have a Django / React application hosted in AKS. React's build is hosted statically with Nginx. The Nginx container is exposed through a ClusterIP, Ingress & Nginx-Controller. The In this app, I'm doing a file upload, which returns nothing. Not an error, not an HTTP status code, nothing. That makes debugging very hard. This doesn't happen locally, and it only happens with files bigger than approx 10mb. Already increased the client_max_body_size in the default.conf of the nginx host. Can't find anything in the Controller docs that indicates a too large filesize, and this would also result in a HTTP 413. Anyone familiar with this?
In React I simply use axios with formData:
let formData = new FormData();
axios.post(`${API_SERVER}/builds`, formData).then(response => {
console.log(response);
}).catch(error => console.log(error));
The HTTP response:
undefined undefined undefined
date: Wed, 08 Dec 2021 15:27:35 GMT
content-type: text/html
content-length: 176
strict-transport-security: max-age=15724800; includeSubDomains
X-Firefox-Spdy: h2
Turns out there is a max body size in the Nginx-Controller. You can change it with the annotation nginx.ingress.kubernetes.io/proxy-body-size.