diff --git a/Dockerfile b/Dockerfile index 7fa6032..cb9ff9c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,6 +25,7 @@ RUN apt-get update --yes --quiet && apt-get install --yes --quiet --no-install-r curl \ git \ nginx \ + libnginx-mod-http-headers-more-filter \ # wand dependencies libmagickwand-6.q16-6 libmagickwand-6.q16hdri-6 \ && apt-get autoremove && rm -rf /var/lib/apt/lists/* diff --git a/etc/gunicorn.conf.py b/etc/gunicorn.conf.py index f3f3fb9..48c83e4 100644 --- a/etc/gunicorn.conf.py +++ b/etc/gunicorn.conf.py @@ -1,5 +1,3 @@ -import gunicorn - wsgi_app = "website.wsgi:application" accesslog = "-" disable_redirect_access_to_syslog = True @@ -11,6 +9,3 @@ forwarded_allow_ips = "*" # Run an additional thread so the GIL isn't sitting completely idle threads = 2 - -# Replace gunicorn's 'Server' HTTP header -gunicorn.SERVER_SOFTWARE = gunicorn.SERVER = "Wouldn't you like to know" diff --git a/etc/nginx.conf b/etc/nginx.conf index cbf860d..4a36acb 100644 --- a/etc/nginx.conf +++ b/etc/nginx.conf @@ -5,11 +5,13 @@ server { gzip_static on; - server_tokens off; - set_real_ip_from 0.0.0.0/0; real_ip_header X-Forwarded-For; + # Override nginx's server header + more_set_headers "Server: Wouldn't you like to know"; + server_tokens off; + location / { proxy_buffers 32 4k; proxy_connect_timeout 240;