From 4fade2fb1f08eae008c435e4c0c5ef03acc9d9a7 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Tue, 13 Aug 2019 02:38:12 +0300 Subject: [PATCH] fix(uwsgi): Fix broken uWSGI config (#237) This patch introduces the following fixes to uWSGI config which was not set up correctly to be used publicly (not behind a router, load balancer, proxy like nginx etc.): - Use `http` option for a front-proxy - Set protocol back to `uwsgi` due to above - Prevent forced socket binding to `uwsgi` due to protocol change above (https://git.io/fj7Lw) - Turn on "keep-alive" support Should fix getsentry/sentry-cli#40. --- sentry.conf.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sentry.conf.py b/sentry.conf.py index 3a8dde4..d02e0d8 100644 --- a/sentry.conf.py +++ b/sentry.conf.py @@ -259,11 +259,16 @@ if env('SENTRY_USE_SSL', False): SENTRY_WEB_HOST = '0.0.0.0' SENTRY_WEB_PORT = 9000 SENTRY_WEB_OPTIONS = { + 'http': '%s:%s' % (SENTRY_WEB_HOST, SENTRY_WEB_PORT), + 'protocol': 'uwsgi', + # This is need to prevent https://git.io/fj7Lw + 'uwsgi-socket': None, + 'http-keepalive': True, + 'memory-report': False, # 'workers': 3, # the number of web workers } - ########## # Docker # ##########