Skip to content

Commit af6393c

Browse files
authored
fix(reverse_proxy): disable nginx server tokens (#109)
1 parent a2c084a commit af6393c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setup(
99
name = 'nethsec',
10-
version = '1.4.5',
10+
version = '1.4.6',
1111
author = 'Giacomo Sanchietti',
1212
author_email = 'giacomo.sanchietti@nethesis.it',
1313
description = 'Utilities for NethSecurity development',

src/nethsec/reverse_proxy/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ def create_location(e_uci, uci_server, location, proxy_pass, domain='', allow=No
8080
e_uci.set('nginx', location_id, 'proxy_set_header', default_headers)
8181
# set body limit to 1GB: same value of NethServer 7
8282
e_uci.set('nginx', location_id, 'client_max_body_size', '1024m')
83+
# disable server tokens
84+
e_uci.set('nginx', location_id, 'server_tokens', 'off')
8385
# setup location
8486
e_uci.set('nginx', location_id, 'uci_server', uci_server)
8587
e_uci.set('nginx', location_id, 'location', location)

0 commit comments

Comments
 (0)