Merge pull request #2338 from GitLaboratory/patch-2
Hide version of the web server
This commit is contained in:
commit
986e8f2f0f
|
@ -1,6 +1,6 @@
|
||||||
# Additional MIME types that you'd like nginx to handle go in here
|
# Additional MIME types that you'd like nginx to handle go in here
|
||||||
types {
|
types {
|
||||||
text/csv csv;
|
text/csv csv;
|
||||||
}
|
}
|
||||||
|
|
||||||
upstream discourse {
|
upstream discourse {
|
||||||
|
@ -31,6 +31,7 @@ server {
|
||||||
gzip_types application/json text/css application/x-javascript;
|
gzip_types application/json text/css application/x-javascript;
|
||||||
|
|
||||||
server_name enter.your.web.hostname.here;
|
server_name enter.your.web.hostname.here;
|
||||||
|
server_tokens off;
|
||||||
|
|
||||||
sendfile on;
|
sendfile on;
|
||||||
|
|
||||||
|
@ -77,11 +78,17 @@ server {
|
||||||
#if ($invalid_referer) { return 403; }
|
#if ($invalid_referer) { return 403; }
|
||||||
|
|
||||||
# custom CSS
|
# custom CSS
|
||||||
location ~ /stylesheet-cache/ { try_files $uri =404; }
|
location ~ /stylesheet-cache/ {
|
||||||
|
try_files $uri =404;
|
||||||
|
}
|
||||||
# images
|
# images
|
||||||
location ~* \.(gif|png|jpg|jpeg|bmp|tif|tiff)$ { try_files $uri =404; }
|
location ~* \.(gif|png|jpg|jpeg|bmp|tif|tiff)$ {
|
||||||
|
try_files $uri =404;
|
||||||
|
}
|
||||||
# thumbnails & optimized images
|
# thumbnails & optimized images
|
||||||
location ~ /_optimized/ { try_files $uri =404; }
|
location ~ /_optimized/ {
|
||||||
|
try_files $uri =404;
|
||||||
|
}
|
||||||
|
|
||||||
# attachments must go through the rails application to get the right content-disposition header
|
# attachments must go through the rails application to get the right content-disposition header
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
|
|
Loading…
Reference in New Issue