{# Prosody server template fragment for the `http` module. For details, see: https://prosody.im/doc/modules/mod_http #} {% if cfg.http_default_host is defined %} http_default_host = "{{ cfg.http_default_host }}" {% endif %} {% if cfg.http_ports is defined %} http_ports = { {% for port in cfg.http_ports %} {{ port | int }}; {% endfor %} } {% endif %} {% if cfg.http_interfaces is defined %} http_interfaces = { {% for interface in cfg.http_interfaces %} {{ interface }}; {% endfor %} } {% endif %} {% if cfg.https_ports is defined %} https_ports = { {% for port in cfg.https_ports %} {{ port | int }}; {% endfor %} } {% endif %} {% if cfg.https_interfaces is defined %} https_interfaces = { {% for interface in cfg.https_interfaces %} {{ interface }}; {% endfor %} } {% endif %} {% if cfg.https_certificate is defined %} https_certificate = {% if cfg.https_certificate is string %}"{{ cfg.https_certificate }}"{% elif cfg.https_certificate is mapping %} { {% for port, path in cfg.https_certificate.items() %} [{{ port | int }}] = "{{ path }}"; {% endfor %} } {% endif %} {% endif %} {% if cfg.https_ssl is defined %} https_ssl = { {% if cfg.https_ssl.certificate is defined %} certificate = "{{ cfg.https_ssl.certificate }}"; {% endif %} {% if cfg.https_ssl.key is defined %} key = "{{ cfg.https_ssl.key }}"; {% endif %} } {% endif %} {% if cfg.http_paths is defined %} http_paths = { {% for k, path in cfg.http_paths.items() %} {{ k }} = "{{ path }}"; {% endfor %} } {% endif %} {% if cfg.http_external_url is defined %} http_external_url = "{{ cfg.http_external_url }}" {% endif %}