supervisor: Large file uploads via ingress fail with "Maximum request body size 16777216 exceeded"

Describe the issue you are experiencing

First of all: I am sorry if this might be the wrong HA repository for this bug report as I am not sure if this is an issue in the supervisor or frontend, but I am trying to file it here first.

As said in the subject of this issue, large file uploads of files > 16MB are currently not possible if they are routed via ingress. In fact, third party add-ons like RaspberryMatic or OctoPrint, etc. already faced this issue because their web interfaces have file upload capabilities to allow to upload files (e.g. backups, data, etc.), but as soon as their web interfaces are accessed via ingress these requests fail with common 413 Request Entity is too large responses to their POST requests.

See here: https://github.com/jens-maus/RaspberryMatic/issues/1294 https://community.home-assistant.io/t/repository-octoprint/22883/101

As soon as the web server of these addons are directly accessed outside the common home assistant web interface (e.g. by using direct port mapping in the add-on settings), thus without ingress routing these requests, file upload succeed correctly for file sizes > 16MB.

However, it still is highly desirable to allow for POST requests (e.g. file uploads) via ingress to succeed even for sizes > 16MB. E.g., for the RaspberryMatic addon users have to upload backup data which could easily succeed sizes > 500MB, thus would prevent any ingress use.

What is the used version of the Supervisor?

supervisor-2021.05.4

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

What is the version of your installed operating system?

6.0

What version of Home Assistant Core is installed?

core-2021.6.3

Steps to reproduce the issue

  1. Install one of the third-party HA add-ons (RaspberryMatic, OctoPrint)
  2. Use their file upload capabilities to try to upload files > 16MB in size
  3. Note that POST requests with sizes > 16Mb fail with a 413 Request Entity is too large request status
  4. Note that the response of the request is cancelled with a Maximum request body size 16777216 exceeded, actual body size 16778032 message by ingress.

Anything in the Supervisor logs that might be useful for us?

no error/warnings logged upon the error event.

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 30 (12 by maintainers)

Commits related to this issue

Most upvoted comments