Invalid response: 413 Request Entity Too Large

I have a jupyterhub running behind nginx proxy, but I regularly get:
Invalid response: 413 Request Entity Too Large

even with small notebooks. Any ideas how to get this working?
Below is my nginx config:

map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

upstream upstream_jupyter {
    server 127.0.0.1:8000;
    keepalive 32;
}

# HTTP server to redirect all 80 traffic to SSL/HTTPS
server {
    listen 80;
    listen [::]:80 default_server;

    # SSL configuration

    listen 443 ssl http2 default_server;
    listen [::]:443 ssl http2 default_server;

    server_name none.of.your.biz;
    include snippets/certificate_geant.conf;
#    include snippets/ssl-params.conf;



    # Managing literal requests to the JupyterHub front end
    location / {
        proxy_pass http://upstream_jupyter;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        # websocket headers
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header X-Scheme $scheme;
        proxy_read_timeout    86400;
        proxy_buffering off;
    }

    location /hub/error {
        proxy_pass http://127.0.0.1:8081/hub/error;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        # websocket headers
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header X-Scheme $scheme;
        proxy_read_timeout    86400;
        proxy_buffering off;
    }
}

I think you want to set client_max_body_size to 0 (disable checking) or a larger value to set the maximum size of notebooks and other files to be uploaded. See also similar reports.