Make compress middleware for /.well-known/matrix/* configurable
This commit is contained in:
@ -13,11 +13,19 @@ traefik.http.services.{{ matrix_static_files_ident }}.loadbalancer.server.port={
|
||||
#}
|
||||
{% if matrix_static_files_container_labels_well_known_matrix_endpoint_enabled %}
|
||||
|
||||
{% set well_known_matrix_endpoint_middlewares = [] %}
|
||||
|
||||
{% if matrix_static_files_container_labels_well_known_matrix_endpoint_middleware_compress_enabled %}
|
||||
traefik.http.middlewares.{{ matrix_static_files_ident }}-well-known-endpoint-compress.compress=true
|
||||
traefik.http.middlewares.{{ matrix_static_files_ident }}-well-known-endpoint-compress.compress.minResponseBodyBytes=100
|
||||
traefik.http.middlewares.{{ matrix_static_files_ident }}-well-known-endpoint-compress.compress.minResponseBodyBytes={{ matrix_static_files_container_labels_well_known_matrix_endpoint_middleware_compress_minResponseBodyBytes }}
|
||||
{% set well_known_matrix_endpoint_middlewares = well_known_matrix_endpoint_middlewares + [matrix_static_files_ident + '-well-known-endpoint-compress'] %}
|
||||
{% endif %}
|
||||
|
||||
traefik.http.routers.{{ matrix_static_files_ident }}-well-known-endpoint.rule={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_rule }}
|
||||
traefik.http.routers.{{ matrix_static_files_ident }}-well-known-endpoint.middlewares={{ matrix_static_files_ident }}-well-known-endpoint-compress
|
||||
|
||||
{% if well_known_matrix_endpoint_middlewares | length > 0 %}
|
||||
traefik.http.routers.{{ matrix_static_files_ident }}-well-known-endpoint.middlewares={{ well_known_matrix_endpoint_middlewares | join(',') }}
|
||||
{% endif %}
|
||||
|
||||
{% if matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_priority | int > 0 %}
|
||||
traefik.http.routers.{{ matrix_static_files_ident }}-well-known-endpoint.priority={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_priority }}
|
||||
|
Reference in New Issue
Block a user