diff --git a/adm/templates/plugins/python3_raw_asgi/cookiecutter.json b/adm/templates/plugins/python3_raw_asgi/cookiecutter.json deleted file mode 120000 index ff76d90d..00000000 --- a/adm/templates/plugins/python3_raw_asgi/cookiecutter.json +++ /dev/null @@ -1 +0,0 @@ -../_common/cookiecutter.json \ No newline at end of file diff --git a/adm/templates/plugins/python3_raw_asgi/cookiecutter.json b/adm/templates/plugins/python3_raw_asgi/cookiecutter.json new file mode 100644 index 00000000..f1137f3d --- /dev/null +++ b/adm/templates/plugins/python3_raw_asgi/cookiecutter.json @@ -0,0 +1,10 @@ +{ + "version": "0.0.1", + "release": "1", + "one_line_summary": "one line summary", + "license": ["Proprietary", "BSD", "MIT", "GPL", "Specific"], + "url": "http://yourpluginhomepage", + "maintainer": "Firstname FAMILYNAME ", + "vendor": "Vendor", + "forwarded_allows_ips": "forwarded ips or NULL" +} diff --git a/adm/templates/plugins/python3_raw_asgi/{{cookiecutter.name}}/config.ini b/adm/templates/plugins/python3_raw_asgi/{{cookiecutter.name}}/config.ini index d575af07..dd86471e 100644 --- a/adm/templates/plugins/python3_raw_asgi/{{cookiecutter.name}}/config.ini +++ b/adm/templates/plugins/python3_raw_asgi/{{cookiecutter.name}}/config.ini @@ -1,5 +1,9 @@ {% extends "_common/config.ini" %} +{% if cookiecutter.forwarded_allows_ips == "NULL" or cookiecutter.forwarded_allows_ips == "forwarded ips or NULL" %} {% set cmd_and_args="uvicorn {debug_extra_options} --uds \"{unix_socket_path}\" --workers 1 {app_name}.application:app" %} +{% else %} +{% set cmd_and_args="uvicorn {debug_extra_options} --uds \"{unix_socket_path}\" --proxy-headers --forwarded-allow-ips=\"" + cookiecutter.forwarded_allows_ips + "\" --workers 1 {app_name}.application:app" %} +{% endif %} {% set debug_extra_options="--access-log --log-level=debug" %}