Remove server header

This commit is contained in:
Jake Howard 2023-11-23 13:54:57 +00:00
parent d4645d3812
commit 9083d5c5fb
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 5 additions and 7 deletions

View file

@ -25,6 +25,7 @@ RUN apt-get update --yes --quiet && apt-get install --yes --quiet --no-install-r
curl \ curl \
git \ git \
nginx \ nginx \
libnginx-mod-http-headers-more-filter \
# wand dependencies # wand dependencies
libmagickwand-6.q16-6 libmagickwand-6.q16hdri-6 \ libmagickwand-6.q16-6 libmagickwand-6.q16hdri-6 \
&& apt-get autoremove && rm -rf /var/lib/apt/lists/* && apt-get autoremove && rm -rf /var/lib/apt/lists/*

View file

@ -1,5 +1,3 @@
import gunicorn
wsgi_app = "website.wsgi:application" wsgi_app = "website.wsgi:application"
accesslog = "-" accesslog = "-"
disable_redirect_access_to_syslog = True 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 # Run an additional thread so the GIL isn't sitting completely idle
threads = 2 threads = 2
# Replace gunicorn's 'Server' HTTP header
gunicorn.SERVER_SOFTWARE = gunicorn.SERVER = "Wouldn't you like to know"

View file

@ -5,11 +5,13 @@ server {
gzip_static on; gzip_static on;
server_tokens off;
set_real_ip_from 0.0.0.0/0; set_real_ip_from 0.0.0.0/0;
real_ip_header X-Forwarded-For; 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 / { location / {
proxy_buffers 32 4k; proxy_buffers 32 4k;
proxy_connect_timeout 240; proxy_connect_timeout 240;