Skip to content

Commit

Permalink
allow error pages override per server
Browse files Browse the repository at this point in the history
  • Loading branch information
tombokombo committed Aug 15, 2023
1 parent 6bba4cb commit 7413c7f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions templates/openresty/conf.d/site.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,15 @@ server {
ssl_certificate {{ server.ssl.certificate}};
{% endif %}

{% for error in _site_error_pages | default([]) %}
{% if server.error_pages_override is defined %}
{% for error in server.error_pages_override | default([]) %}
error_page {{ error }};
{% endfor %}
{% endfor %}
{% else %}
{% for error in _site_error_pages | default([]) %}
error_page {{ error }};
{% endfor %}
{% endif %}

{% if _site_error_pages_recursive | default(false) %}
recursive_error_pages on;
Expand Down

0 comments on commit 7413c7f

Please sign in to comment.