{% for k, v in all.items() +%} {% if k.startswith("CUSTOM_HEADER") and v != "" +%} more_set_headers "{{ v }}"; {% endif %} {% endfor %}