mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
nginx: complain about using $http_host rather than $host
This commit is contained in:
parent
50a325d27a
commit
6a5c346ecd
1 changed files with 10 additions and 0 deletions
|
@ -1295,6 +1295,16 @@ class Configurations(TestSuite):
|
|||
"DO NOT run the app PHP worker as root or www-data! Use a dedicated system user for this app!"
|
||||
)
|
||||
|
||||
@test()
|
||||
def nginx_http_host(self):
|
||||
|
||||
app = self.app
|
||||
|
||||
if os.path.exists(app.path + "/conf/nginx.conf"):
|
||||
content = open(app.path + "/conf/nginx.conf").read()
|
||||
if "$http_host" in content:
|
||||
yield Info("In nginx.conf : please don't use $http_host but $host instead. C.f. https://github.com/yandex/gixy/blob/master/docs/en/plugins/hostspoofing.md")
|
||||
|
||||
@test()
|
||||
def nginx_https_redirect(self):
|
||||
|
||||
|
|
Loading…
Reference in a new issue