web: nginx allows 5 MiB on /api/ to match the API (#160 finding 10); SELF_HOSTING names the proxy body limit
This commit is contained in:
1 parent
8b2fc43c8a
commit
db48e6e00d
2 files changed
+7
-1
No files matched your search
@@ -20,6 +20,10 @@ server {
|
||||
# as /api/anything.json would be matched by the \.(js|css|json|html)$ block instead and be
|
||||
# looked for on disk rather than proxied.
|
||||
location ^~ /api/ {
|
||||
# Match the API's own body limit (MAX_BODY in api/server.js): the whole workout history
|
||||
# travels in one PUT /api/data, and nginx's 1 MiB default would answer 413 here before the
|
||||
# API ever saw it — a sync that silently stops once the history grows past 1 MiB.
|
||||
client_max_body_size 5m;
|
||||
# Resolved per request through Docker's DNS, not once at start-up: nginx otherwise pins
|
||||
# the api container's IP when it boots, and a recreated api (new IP) means 502 on every
|
||||
# /api call until web is restarted too (issue #16). The variable is what makes nginx
|
||||
|
||||
Reference in new issue
Block a user