From e7d3e722cea97c6c955001b6fbf170748abde475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Mon, 14 Jun 2021 13:06:00 +0200 Subject: [PATCH] fix: "upstream sent too big header" nginx errors It was reported that existing users could not sign-in after a Koa -> Lilac upgrade. This is due to the fact that cookies exceed the 4kb limit, which is rejected by nginx. The fix consists in increasing this limit to 8kb: http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffer_size This issue was reported here: https://discuss.overhang.io/t/lilac-upgrade-login-issues/1617 Note that I was not able to reproduce the issue. The fix was tested by the issue reporter. --- CHANGELOG.md | 2 ++ tutor/templates/apps/nginx/lms.conf | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5e0146..05eae31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ Note: Breaking changes between versions are indicated by "💥". ## Unreleased +- [Bugfix] Fix "upstream sent too big header" error during login of existing users after a Koa to Lilac upgrade. + ## v12.0.0 (2021-06-09) - 💥[Improvement] Upgrade all services to open-release/lilac.master. diff --git a/tutor/templates/apps/nginx/lms.conf b/tutor/templates/apps/nginx/lms.conf index 6b0d135..f95b930 100644 --- a/tutor/templates/apps/nginx/lms.conf +++ b/tutor/templates/apps/nginx/lms.conf @@ -13,6 +13,9 @@ server { rewrite ^(.*)/favicon.ico$ /static/images/favicon.ico last; + # Allow large cookies + proxy_buffer_size 8k; + location @proxy_to_lms_app { proxy_redirect off; proxy_set_header Host $http_host;