1
0
angie-conv-image/angie/autoconf.dist/http-alt-svc.conf.j2

12 lines
478 B
Plaintext
Raw Normal View History

2024-07-31 14:04:15 +03:00
{#- prologue -#}
{%- set extra_proto = ['v3', 'v2'] -%}
{%- set confload = ( env.NGX_HTTP_CONFLOAD or '' ) | str_split_to_list -%}
{%- set proto = confload | list_intersect(extra_proto) -%}
{#- ALPN mapping -#}
{%- set proto = proto | re_sub('^v2$', 'h2=":443"; ma=3600') -%}
{%- set proto = proto | re_sub('^v3$', 'h3=":443"; ma=3600') -%}
{#- main part -#}
{%- if proto %}
{#- TODO: precise quotation #}
add_header Alt-Svc {{ (proto | join(', ')).__repr__() }};
{%- endif %}