Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
oxpa committed Aug 15, 2023
1 parent 49564ac commit 483fc3b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
5 changes: 3 additions & 2 deletions templates/core.j2
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ timer_resolution {{ main['timer_resolution'] }};
{% if main['working_directory'] is defined %}
working_directory {{ main['working_directory'] }};
{% endif %}
{% if main['quic'] is defined and main['quic']['bpf'] is defined and main['quic']['bpf'] is boolean %}
quic_bpf {{ main['quic']['bpf'] | ternary('on', 'off') }};
{% if main['quic'] is defined %}
{% from 'http/modules.j2' import quic with context %}
{{ quic(main['quic'], 'global') }}
{% endif %}
{% endmacro %}

Expand Down
10 changes: 8 additions & 2 deletions templates/http/modules.j2
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,13 @@ http3_stream_buffer_size {{ http3['stream_buffer_size'] }};

{% endmacro %}

{# NGINX QUIC -- ngix_http_v3_module #}
{% macro quic(quic) %}
{# NGINX QUIC -- ngx_event_quic #} {# exposed for use and documented through ngx_http_v3_module #}
{% macro quic(quic, scope='http') %}
{% if scope == 'global' %}
{% if quic is defined and quic['bpf'] is defined and quic['bpf'] is boolean %}
quic_bpf {{ quic['bpf'] | ternary('on', 'off') }};
{% endif %}
{% else %}
{% if quic['active_connection_id_limit'] is defined and quic['active_connection_id_limit'] is number %}
quic_active_connection_id_limit {{ quic['active_connection_id_limit'] }};
{% endif %}
Expand All @@ -384,5 +389,6 @@ quic_host_key {{ quic['host_key'] }};
{% if quic['retry'] is defined and quic['retry'] is boolean %}
quic_retry {{ quic['retry'] | ternary('on','off') }};
{% endif %}
{% endif %}

{% endmacro %}

0 comments on commit 483fc3b

Please sign in to comment.