Compare commits
5 Commits
ad28448d0c
...
fe1ef64e67
Author | SHA1 | Date | |
---|---|---|---|
fe1ef64e67 | |||
07fa7431d2 | |||
441ea2e64b | |||
99696ed5d9 | |||
9b99cb39fb |
@ -26,6 +26,6 @@ env {{ k }};
|
||||
##
|
||||
{%- for k in c_vars_override %}
|
||||
{#- {%- set v = c_env[k] %} #}
|
||||
## env {{ k }}={{ c_env[k].__repr__() }};
|
||||
## env {{ k }}={{ c_env[k] | ngx_esc }};
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
1
angie/autoconf.dist/http-alt-svc.conf
Normal file
1
angie/autoconf.dist/http-alt-svc.conf
Normal file
@ -0,0 +1 @@
|
||||
include snip.d/http-alt-svc;
|
@ -11,7 +11,7 @@ map $http_user_agent
|
||||
default $http_user_agent;
|
||||
{%- if env.NGX_HTTP_FAKE_UA %}
|
||||
## merely fake
|
||||
"" {{ env.NGX_HTTP_FAKE_UA.__repr__() }};
|
||||
"" {{ env.NGX_HTTP_FAKE_UA | ngx_esc }};
|
||||
{%- else %}
|
||||
"" "Angie/$angie_version";
|
||||
{%- endif %}
|
||||
|
1
angie/autoconf.dist/http-response-headers.conf
Normal file
1
angie/autoconf.dist/http-response-headers.conf
Normal file
@ -0,0 +1 @@
|
||||
include snip.d/http-response-headers;
|
@ -1,15 +1,14 @@
|
||||
{#- TODO: precise quotation -#}
|
||||
{%- set cache_bypass = j2cfg.cache_bypass or [] -%}
|
||||
{%- if cache_bypass -%}
|
||||
## disable (response) cache under following conditions
|
||||
fastcgi_cache_bypass
|
||||
{%- for v in cache_bypass %}
|
||||
{{ v.__repr__() }}
|
||||
{{ v | ngx_esc }}
|
||||
{%- endfor %}
|
||||
;
|
||||
fastcgi_no_cache
|
||||
{%- for v in cache_bypass %}
|
||||
{{ v.__repr__() }}
|
||||
{{ v | ngx_esc }}
|
||||
{%- endfor %}
|
||||
;
|
||||
{%- endif -%}
|
2
angie/conf.dist/fastcgi/headers.conf
Normal file
2
angie/conf.dist/fastcgi/headers.conf
Normal file
@ -0,0 +1,2 @@
|
||||
include snip.d/fastcgi-request-headers;
|
||||
include snip.d/fastcgi-response-headers;
|
@ -1,13 +0,0 @@
|
||||
## hide/remove request headers
|
||||
{%- set req_hdr_dict = j2cfg.request_headers or {} -%}
|
||||
{%- for h, v in req_hdr_dict.items() %}
|
||||
{#- TODO: precise quotation #}
|
||||
fastcgi_param {{ h | as_cgi_header }} {{ v.__repr__() }};
|
||||
{%- endfor %}
|
||||
|
||||
## hide response headers
|
||||
{%- set resp_hdr_dict = j2cfg.response_headers or {} -%}
|
||||
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
||||
{%- for h in resp_hdr_list %}
|
||||
fastcgi_hide_header {{ h }};
|
||||
{%- endfor %}
|
2
angie/conf.dist/grpc/headers.conf
Normal file
2
angie/conf.dist/grpc/headers.conf
Normal file
@ -0,0 +1,2 @@
|
||||
include snip.d/grpc-request-headers;
|
||||
include snip.d/grpc-response-headers;
|
@ -1,13 +0,0 @@
|
||||
## hide/remove request headers
|
||||
{%- set req_hdr_dict = j2cfg.request_headers or {} -%}
|
||||
{%- for h, v in req_hdr_dict.items() %}
|
||||
{#- TODO: precise quotation #}
|
||||
grpc_set_header {{ h }} {{ v.__repr__() }};
|
||||
{%- endfor %}
|
||||
|
||||
## hide response headers
|
||||
{%- set resp_hdr_dict = j2cfg.response_headers or {} -%}
|
||||
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
||||
{%- for h in resp_hdr_list %}
|
||||
grpc_hide_header {{ h }};
|
||||
{%- endfor %}
|
@ -1,6 +1,5 @@
|
||||
{%- for k, v in j2cfg.tls.conf_cmd.items() %}
|
||||
{#- TODO: precise quotation #}
|
||||
grpc_ssl_conf_command {{ k }} {{ v.__repr__() }};
|
||||
grpc_ssl_conf_command {{ k }} {{ v | ngx_esc }};
|
||||
{%- endfor %}
|
||||
|
||||
grpc_ssl_trusted_certificate {{ env.NGX_SSL_CERT_FILE }};
|
||||
|
@ -15,12 +15,10 @@ ssl_stapling_verify on;
|
||||
ssl_stapling_verify off;
|
||||
{%- endif %}
|
||||
{%- if j2cfg.tls.stapling.file %}
|
||||
{#- TODO: precise quotation #}
|
||||
ssl_stapling_file {{ j2cfg.tls.stapling.file.__repr__() }};
|
||||
ssl_stapling_file {{ j2cfg.tls.stapling.file | ngx_esc }};
|
||||
{%- endif %}
|
||||
{%- if j2cfg.tls.stapling.responder %}
|
||||
{#- TODO: precise quotation #}
|
||||
ssl_stapling_responder {{ j2cfg.tls.stapling.responder.__repr__() }};
|
||||
ssl_stapling_responder {{ j2cfg.tls.stapling.responder | ngx_esc }};
|
||||
{%- endif %}
|
||||
{%- else %}
|
||||
ssl_stapling off;
|
||||
|
@ -1,15 +1,14 @@
|
||||
{#- TODO: precise quotation -#}
|
||||
{%- set cache_bypass = j2cfg.cache_bypass or [] -%}
|
||||
{%- if cache_bypass -%}
|
||||
## disable (response) cache under following conditions
|
||||
proxy_cache_bypass
|
||||
{%- for v in cache_bypass %}
|
||||
{{ v.__repr__() }}
|
||||
{{ v | ngx_esc }}
|
||||
{%- endfor %}
|
||||
;
|
||||
proxy_no_cache
|
||||
{%- for v in cache_bypass %}
|
||||
{{ v.__repr__() }}
|
||||
{{ v | ngx_esc }}
|
||||
{%- endfor %}
|
||||
;
|
||||
{%- endif -%}
|
2
angie/conf.dist/proxy-http/headers.conf
Normal file
2
angie/conf.dist/proxy-http/headers.conf
Normal file
@ -0,0 +1,2 @@
|
||||
include snip.d/proxy-request-headers;
|
||||
include snip.d/proxy-response-headers;
|
@ -1,13 +0,0 @@
|
||||
## hide/remove request headers
|
||||
{%- set req_hdr_dict = j2cfg.request_headers or {} -%}
|
||||
{%- for h, v in req_hdr_dict.items() %}
|
||||
{#- TODO: precise quotation #}
|
||||
proxy_set_header {{ h }} {{ v.__repr__() }};
|
||||
{%- endfor %}
|
||||
|
||||
## hide response headers
|
||||
{%- set resp_hdr_dict = j2cfg.response_headers or {} -%}
|
||||
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
||||
{%- for h in resp_hdr_list %}
|
||||
proxy_hide_header {{ h }};
|
||||
{%- endfor %}
|
@ -1,6 +1,5 @@
|
||||
{%- for k, v in j2cfg.tls.conf_cmd.items() %}
|
||||
{#- TODO: precise quotation #}
|
||||
proxy_ssl_conf_command {{ k }} {{ v.__repr__() }};
|
||||
proxy_ssl_conf_command {{ k }} {{ v | ngx_esc }};
|
||||
{%- endfor %}
|
||||
|
||||
proxy_ssl_trusted_certificate {{ env.NGX_SSL_CERT_FILE }};
|
||||
|
@ -1,15 +1,14 @@
|
||||
{#- TODO: precise quotation -#}
|
||||
{%- set cache_bypass = j2cfg.cache_bypass or [] -%}
|
||||
{%- if cache_bypass -%}
|
||||
## disable (response) cache under following conditions
|
||||
scgi_cache_bypass
|
||||
{%- for v in cache_bypass %}
|
||||
{{ v.__repr__() }}
|
||||
{{ v | ngx_esc }}
|
||||
{%- endfor %}
|
||||
;
|
||||
scgi_no_cache
|
||||
{%- for v in cache_bypass %}
|
||||
{{ v.__repr__() }}
|
||||
{{ v | ngx_esc }}
|
||||
{%- endfor %}
|
||||
;
|
||||
{%- endif -%}
|
2
angie/conf.dist/scgi/headers.conf
Normal file
2
angie/conf.dist/scgi/headers.conf
Normal file
@ -0,0 +1,2 @@
|
||||
include snip.d/scgi-request-headers;
|
||||
include snip.d/scgi-response-headers;
|
@ -1,13 +0,0 @@
|
||||
## hide/remove request headers
|
||||
{%- set req_hdr_dict = j2cfg.request_headers or {} -%}
|
||||
{%- for h, v in req_hdr_dict.items() %}
|
||||
{#- TODO: precise quotation #}
|
||||
scgi_param {{ h | as_cgi_header }} {{ v.__repr__() }};
|
||||
{%- endfor %}
|
||||
|
||||
## hide response headers
|
||||
{%- set resp_hdr_dict = j2cfg.response_headers or {} -%}
|
||||
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
||||
{%- for h in resp_hdr_list %}
|
||||
scgi_hide_header {{ h }};
|
||||
{%- endfor %}
|
@ -1,4 +1,3 @@
|
||||
{%- for k, v in j2cfg.tls.conf_cmd.items() %}
|
||||
{#- TODO: precise quotation #}
|
||||
ssl_conf_command {{ k }} {{ v.__repr__() }};
|
||||
ssl_conf_command {{ k }} {{ v | ngx_esc }};
|
||||
{%- endfor %}
|
@ -1,15 +1,14 @@
|
||||
{#- TODO: precise quotation -#}
|
||||
{%- set cache_bypass = j2cfg.cache_bypass or [] -%}
|
||||
{%- if cache_bypass -%}
|
||||
## disable (response) cache under following conditions
|
||||
uwsgi_cache_bypass
|
||||
{%- for v in cache_bypass %}
|
||||
{{ v.__repr__() }}
|
||||
{{ v | ngx_esc }}
|
||||
{%- endfor %}
|
||||
;
|
||||
uwsgi_no_cache
|
||||
{%- for v in cache_bypass %}
|
||||
{{ v.__repr__() }}
|
||||
{{ v | ngx_esc }}
|
||||
{%- endfor %}
|
||||
;
|
||||
{%- endif -%}
|
2
angie/conf.dist/uwsgi/headers.conf
Normal file
2
angie/conf.dist/uwsgi/headers.conf
Normal file
@ -0,0 +1,2 @@
|
||||
include snip.d/uwsgi-request-headers;
|
||||
include snip.d/uwsgi-response-headers;
|
@ -1,13 +0,0 @@
|
||||
## hide/remove request headers
|
||||
{%- set req_hdr_dict = j2cfg.request_headers or {} -%}
|
||||
{%- for h, v in req_hdr_dict.items() %}
|
||||
{#- TODO: precise quotation #}
|
||||
uwsgi_param {{ h | as_cgi_header }} {{ v.__repr__() }};
|
||||
{%- endfor %}
|
||||
|
||||
## hide response headers
|
||||
{%- set resp_hdr_dict = j2cfg.response_headers or {} -%}
|
||||
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
||||
{%- for h in resp_hdr_list %}
|
||||
uwsgi_hide_header {{ h }};
|
||||
{%- endfor %}
|
@ -1,6 +1,5 @@
|
||||
{%- for k, v in j2cfg.tls.conf_cmd.items() %}
|
||||
{#- TODO: precise quotation #}
|
||||
uwsgi_ssl_conf_command {{ k }} {{ v.__repr__() }};
|
||||
uwsgi_ssl_conf_command {{ k }} {{ v | ngx_esc }};
|
||||
{%- endfor %}
|
||||
|
||||
uwsgi_ssl_trusted_certificate {{ env.NGX_SSL_CERT_FILE }};
|
||||
|
6
angie/snip.dist/fastcgi-request-headers.j2
Normal file
6
angie/snip.dist/fastcgi-request-headers.j2
Normal file
@ -0,0 +1,6 @@
|
||||
## sourced by conf.d/fastcgi/headers.conf
|
||||
## set/remove request headers
|
||||
{%- set req_hdr_dict = j2cfg.request_headers or {} -%}
|
||||
{%- for h, v in req_hdr_dict.items() %}
|
||||
fastcgi_param {{ h | as_cgi_header }} {{ v | ngx_esc }};
|
||||
{%- endfor %}
|
7
angie/snip.dist/fastcgi-response-headers.j2
Normal file
7
angie/snip.dist/fastcgi-response-headers.j2
Normal file
@ -0,0 +1,7 @@
|
||||
## sourced by conf.d/fastcgi/headers.conf
|
||||
## hide response headers
|
||||
{%- set resp_hdr_dict = j2cfg.response_headers or {} -%}
|
||||
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
||||
{%- for h in resp_hdr_list %}
|
||||
fastcgi_hide_header {{ h }};
|
||||
{%- endfor %}
|
6
angie/snip.dist/grpc-request-headers.j2
Normal file
6
angie/snip.dist/grpc-request-headers.j2
Normal file
@ -0,0 +1,6 @@
|
||||
## sourced by conf.d/grpc/headers.conf
|
||||
## set/remove request headers
|
||||
{%- set req_hdr_dict = j2cfg.request_headers or {} -%}
|
||||
{%- for h, v in req_hdr_dict.items() %}
|
||||
grpc_set_header {{ h }} {{ v | ngx_esc }};
|
||||
{%- endfor %}
|
7
angie/snip.dist/grpc-response-headers.j2
Normal file
7
angie/snip.dist/grpc-response-headers.j2
Normal file
@ -0,0 +1,7 @@
|
||||
## sourced by conf.d/grpc/headers.conf
|
||||
## hide response headers
|
||||
{%- set resp_hdr_dict = j2cfg.response_headers or {} -%}
|
||||
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
||||
{%- for h in resp_hdr_list %}
|
||||
grpc_hide_header {{ h }};
|
||||
{%- endfor %}
|
@ -1,3 +1,4 @@
|
||||
## sourced by autoconf.d/http-alt-svc.conf
|
||||
{#- prologue -#}
|
||||
{%- set extra_proto = ['v3', 'v2'] -%}
|
||||
{%- set confload = ( env.NGX_HTTP_CONFLOAD or '' ) | str_split_to_list -%}
|
||||
@ -7,6 +8,5 @@
|
||||
{%- set proto = proto | re_sub('^v3$', 'h3=":443"; ma=3600') -%}
|
||||
{#- main part -#}
|
||||
{%- if proto %}
|
||||
{#- TODO: precise quotation #}
|
||||
add_header Alt-Svc {{ (proto | join(', ')).__repr__() }};
|
||||
add_header Alt-Svc {{ (proto | join(', ')) | ngx_esc }};
|
||||
{%- endif %}
|
@ -1,6 +1,6 @@
|
||||
## sourced by autoconf.d/http-response-headers.conf
|
||||
## add response headers
|
||||
{%- set resp_hdr_dict = j2cfg.response_headers or {} -%}
|
||||
{%- for h, v in resp_hdr_dict.items() %}
|
||||
{#- TODO: precise quotation #}
|
||||
add_header {{ h }} {{ v.__repr__() }};
|
||||
add_header {{ h }} {{ v | ngx_esc }};
|
||||
{%- endfor %}
|
6
angie/snip.dist/proxy-request-headers.j2
Normal file
6
angie/snip.dist/proxy-request-headers.j2
Normal file
@ -0,0 +1,6 @@
|
||||
## sourced by conf.d/proxy-http/headers.conf
|
||||
## set/remove request headers
|
||||
{%- set req_hdr_dict = j2cfg.request_headers or {} -%}
|
||||
{%- for h, v in req_hdr_dict.items() %}
|
||||
proxy_set_header {{ h }} {{ v | ngx_esc }};
|
||||
{%- endfor %}
|
7
angie/snip.dist/proxy-response-headers.j2
Normal file
7
angie/snip.dist/proxy-response-headers.j2
Normal file
@ -0,0 +1,7 @@
|
||||
## sourced by conf.d/proxy-http/headers.conf
|
||||
## hide response headers
|
||||
{%- set resp_hdr_dict = j2cfg.response_headers or {} -%}
|
||||
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
||||
{%- for h in resp_hdr_list %}
|
||||
proxy_hide_header {{ h }};
|
||||
{%- endfor %}
|
6
angie/snip.dist/scgi-request-headers.j2
Normal file
6
angie/snip.dist/scgi-request-headers.j2
Normal file
@ -0,0 +1,6 @@
|
||||
## sourced by conf.d/scgi/headers.conf
|
||||
## set/remove request headers
|
||||
{%- set req_hdr_dict = j2cfg.request_headers or {} -%}
|
||||
{%- for h, v in req_hdr_dict.items() %}
|
||||
scgi_param {{ h | as_cgi_header }} {{ v | ngx_esc }};
|
||||
{%- endfor %}
|
7
angie/snip.dist/scgi-response-headers.j2
Normal file
7
angie/snip.dist/scgi-response-headers.j2
Normal file
@ -0,0 +1,7 @@
|
||||
## sourced by conf.d/scgi/headers.conf
|
||||
## hide response headers
|
||||
{%- set resp_hdr_dict = j2cfg.response_headers or {} -%}
|
||||
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
||||
{%- for h in resp_hdr_list %}
|
||||
scgi_hide_header {{ h }};
|
||||
{%- endfor %}
|
6
angie/snip.dist/uwsgi-request-headers.j2
Normal file
6
angie/snip.dist/uwsgi-request-headers.j2
Normal file
@ -0,0 +1,6 @@
|
||||
## sourced by conf.d/uwsgi/headers.conf
|
||||
## set/remove request headers
|
||||
{%- set req_hdr_dict = j2cfg.request_headers or {} -%}
|
||||
{%- for h, v in req_hdr_dict.items() %}
|
||||
uwsgi_param {{ h | as_cgi_header }} {{ v | ngx_esc }};
|
||||
{%- endfor %}
|
7
angie/snip.dist/uwsgi-response-headers.j2
Normal file
7
angie/snip.dist/uwsgi-response-headers.j2
Normal file
@ -0,0 +1,7 @@
|
||||
## sourced by conf.d/uwsgi/headers.conf
|
||||
## hide response headers
|
||||
{%- set resp_hdr_dict = j2cfg.response_headers or {} -%}
|
||||
{%- set resp_hdr_list = resp_hdr_dict | dict_keys -%}
|
||||
{%- for h in resp_hdr_list %}
|
||||
uwsgi_hide_header {{ h }};
|
||||
{%- endfor %}
|
@ -2,7 +2,7 @@
|
||||
set -ef
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
IMAGE_VERSION="${IMAGE_VERSION:-v0.0.4}"
|
||||
IMAGE_VERSION="${IMAGE_VERSION:-v0.0.5}"
|
||||
|
||||
set -a
|
||||
BUILDAH_FORMAT="${BUILDAH_FORMAT:-docker}"
|
||||
|
@ -2,7 +2,7 @@
|
||||
set -ef
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
IMAGE_VERSION="${IMAGE_VERSION:-v0.0.4}"
|
||||
IMAGE_VERSION="${IMAGE_VERSION:-v0.0.5}"
|
||||
|
||||
set -a
|
||||
BUILDAH_FORMAT="${BUILDAH_FORMAT:-docker}"
|
||||
|
@ -2,7 +2,7 @@
|
||||
set -ef
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
IMAGE_VERSION="${IMAGE_VERSION:-v0.0.4}"
|
||||
IMAGE_VERSION="${IMAGE_VERSION:-v0.0.5}"
|
||||
|
||||
set -a
|
||||
BUILDAH_FORMAT="${BUILDAH_FORMAT:-docker}"
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM docker.io/rockdrilla/angie-conv:v0.0.4
|
||||
FROM docker.io/rockdrilla/angie-conv:v0.0.5
|
||||
SHELL [ "/bin/sh", "-ec" ]
|
||||
|
||||
COPY /site/ /etc/angie/site/
|
||||
|
@ -11,7 +11,7 @@ server {
|
||||
Dockerfile:
|
||||
|
||||
```dockerfile
|
||||
FROM docker.io/rockdrilla/angie-conv:v0.0.4
|
||||
FROM docker.io/rockdrilla/angie-conv:v0.0.5
|
||||
|
||||
COPY /site/ /etc/angie/site/
|
||||
COPY /static/ /etc/angie/static/
|
||||
|
@ -58,7 +58,7 @@ services:
|
||||
|
||||
my-cache:
|
||||
container_name: my-cache
|
||||
image: docker.io/rockdrilla/angie-conv:v0.0.4
|
||||
image: docker.io/rockdrilla/angie-conv:v0.0.5
|
||||
restart: always
|
||||
privileged: true
|
||||
stop_grace_period: 15s
|
||||
|
@ -4,7 +4,7 @@ services:
|
||||
|
||||
my-cache:
|
||||
container_name: my-cache
|
||||
image: docker.io/rockdrilla/angie-conv:v0.0.4
|
||||
image: docker.io/rockdrilla/angie-conv:v0.0.5
|
||||
restart: always
|
||||
privileged: true
|
||||
stop_grace_period: 15s
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM docker.io/rockdrilla/angie-conv:v0.0.4
|
||||
FROM docker.io/rockdrilla/angie-conv:v0.0.5
|
||||
SHELL [ "/bin/sh", "-ec" ]
|
||||
|
||||
COPY /site/ /etc/angie/site/
|
||||
|
@ -3,7 +3,7 @@
|
||||
Dockerfile:
|
||||
|
||||
```dockerfile
|
||||
FROM docker.io/rockdrilla/angie-conv:v0.0.4
|
||||
FROM docker.io/rockdrilla/angie-conv:v0.0.5
|
||||
|
||||
COPY /site/ /etc/angie/site/
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM docker.io/rockdrilla/angie-conv:v0.0.4
|
||||
FROM docker.io/rockdrilla/angie-conv:v0.0.5
|
||||
SHELL [ "/bin/sh", "-ec" ]
|
||||
|
||||
COPY /site/ /etc/angie/site/
|
||||
|
@ -3,7 +3,7 @@
|
||||
Dockerfile:
|
||||
|
||||
```dockerfile
|
||||
FROM docker.io/rockdrilla/angie-conv:v0.0.4
|
||||
FROM docker.io/rockdrilla/angie-conv:v0.0.5
|
||||
|
||||
COPY /site/ /etc/angie/site/
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM docker.io/rockdrilla/angie-conv:v0.0.4
|
||||
FROM docker.io/rockdrilla/angie-conv:v0.0.5
|
||||
SHELL [ "/bin/sh", "-ec" ]
|
||||
|
||||
COPY /site/ /etc/angie/site/
|
||||
|
@ -3,7 +3,7 @@
|
||||
Dockerfile:
|
||||
|
||||
```dockerfile
|
||||
FROM docker.io/rockdrilla/angie-conv:v0.0.4
|
||||
FROM docker.io/rockdrilla/angie-conv:v0.0.5
|
||||
|
||||
COPY /site/ /etc/angie/site/
|
||||
COPY /static/ /etc/angie/static/
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM docker.io/rockdrilla/angie-conv:v0.0.4
|
||||
FROM docker.io/rockdrilla/angie-conv:v0.0.5
|
||||
SHELL [ "/bin/sh", "-ec" ]
|
||||
|
||||
COPY /site/ /etc/angie/site/
|
||||
|
@ -13,7 +13,7 @@ server {
|
||||
Dockerfile:
|
||||
|
||||
```dockerfile
|
||||
FROM docker.io/rockdrilla/angie-conv:v0.0.4
|
||||
FROM docker.io/rockdrilla/angie-conv:v0.0.5
|
||||
|
||||
COPY /site/ /etc/angie/site/
|
||||
COPY /static/ /etc/angie/static/
|
||||
|
@ -240,6 +240,27 @@ def sh_like_file_to_list(j2env, file_in: str) -> list:
|
||||
))
|
||||
|
||||
|
||||
def ngx_esc(x):
|
||||
if isinstance(x, str):
|
||||
if x == "":
|
||||
return "''"
|
||||
if re.search(r'(?:\s|[;{}()\[\]\\\'"])', x):
|
||||
return repr(x)
|
||||
return x
|
||||
if is_sequence(x):
|
||||
return uniq([
|
||||
ngx_esc(v)
|
||||
for v in x
|
||||
])
|
||||
if is_mapping(x):
|
||||
return dict_remap_keys(
|
||||
x, ngx_esc
|
||||
)
|
||||
if x is None:
|
||||
return None
|
||||
return ngx_esc(str(x))
|
||||
|
||||
|
||||
def merge_dict_recurse(d1, d2: dict) -> dict:
|
||||
x = {} | d1
|
||||
|
||||
@ -290,6 +311,7 @@ J2CFG_FILTERS = [
|
||||
is_sequence,
|
||||
list_diff,
|
||||
list_intersect,
|
||||
ngx_esc,
|
||||
re_fullmatch,
|
||||
re_fullmatch_negate,
|
||||
re_match,
|
||||
|
@ -1,5 +1,5 @@
|
||||
jinja2==3.1.4
|
||||
netaddr==1.3.0
|
||||
psutil==6.0.0
|
||||
psutil==6.1.0
|
||||
pyyaml==6.0.2
|
||||
wcmatch==10.0
|
||||
|
Loading…
Reference in New Issue
Block a user