mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
Merge pull request #45 from YunoHost/warn_about_add_header
Warn about the use of add_header in nginx conf
This commit is contained in:
commit
f8bbccd78a
1 changed files with 5 additions and 0 deletions
|
@ -122,6 +122,11 @@ def check_files_exist(app_path):
|
||||||
if file_exists(app_path + "/conf/php-fpm.ini"):
|
if file_exists(app_path + "/conf/php-fpm.ini"):
|
||||||
print_warning("Using a separate php-fpm.ini file is deprecated. Please merge your php-fpm directives directly in the pool file. (c.f. https://github.com/YunoHost-Apps/nextcloud_ynh/issues/138 )")
|
print_warning("Using a separate php-fpm.ini file is deprecated. Please merge your php-fpm directives directly in the pool file. (c.f. https://github.com/YunoHost-Apps/nextcloud_ynh/issues/138 )")
|
||||||
|
|
||||||
|
for filename in os.listdir(app_path + "/conf"):
|
||||||
|
content = read_file_raw(app_path + "/conf/" + filename)
|
||||||
|
if "location" in content and "add_header" in content:
|
||||||
|
print_warning("Do not use 'add_header' in the nginx conf. Use 'more_set_headers' instead. (See https://www.peterbe.com/plog/be-very-careful-with-your-add_header-in-nginx and https://github.com/openresty/headers-more-nginx-module#more_set_headers )")
|
||||||
|
|
||||||
|
|
||||||
def check_source_management(app_path):
|
def check_source_management(app_path):
|
||||||
print_header("SOURCES MANAGEMENT")
|
print_header("SOURCES MANAGEMENT")
|
||||||
|
|
Loading…
Reference in a new issue