1
0

initial commit

This commit is contained in:
2025-06-05 11:01:19 +03:00
commit 48f13f97a3
297 changed files with 7136 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
{# TODO: investigate error with "include" #}
{# {%- include 'core-worker-env.j2inc' -%} #}
{%- set w_env = ( j2cfg.core_worker_env or [] ) | any_to_env_dict -%}
{#- NB: "TZ" is always provided by Angie itself -#}
{%- set w_vars_passthrough = w_env | dict_empty_keys | list_diff(env_vars_preserve + ['TZ']) -%}
{%- set vars_passthrough = (env_vars_passthrough + w_vars_passthrough) | uniq | list_intersect(env | dict_keys) -%}
## NB: "TZ" is always provided by Angie itself
## preserve
{%- for k in env_vars_preserve %}
env {{ k | ngx_esc }};
{%- endfor %}
## passthrough
{%- for k in vars_passthrough %}
env {{ k | ngx_esc }};
{%- endfor %}
{%- set w_vars_override = w_env | dict_non_empty_keys -%}
{% if w_vars_override %}
## WARNING!
## explicit environment variables are NOT implemented
## reason: envs are supported only for http_perl but not for http_js/stream_js
## solution: provide environment variables explicitly
## and then list them in "core_worker_env" key in config
##
{%- for k in w_vars_override %}
## env {{ "{}={}".format(k, w_env[k]) | ngx_esc }}
{%- endfor %}
{%- endif %}