Skip to content

Commit

Permalink
Allow undefined http_to_https and refactoring template
Browse files Browse the repository at this point in the history
  • Loading branch information
iRakic committed Dec 28, 2023
1 parent 533fc37 commit 56547f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion templates/vhost.j2
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ server {
{% endblock %}

{% block https_to_http %}
{% if item.http_to_https %}
{% if item.http_to_https is defined and item.http_to_https %}
server {
listen {{ item.listen_http | default('80') }};
{% if item.server_name is defined %}server_name {{ item.server_name }};{% endif %}

return 301 https://$host$request_uri;
}
{% endif %}
Expand Down

0 comments on commit 56547f0

Please sign in to comment.