From 6bba4cbacdedb3ecf26d27041cfa5ce671072345 Mon Sep 17 00:00:00 2001 From: tombo Date: Mon, 14 Aug 2023 20:27:30 +0200 Subject: [PATCH] add recursive_error_pages option --- templates/openresty/conf.d/site.conf.j2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/openresty/conf.d/site.conf.j2 b/templates/openresty/conf.d/site.conf.j2 index 340db53..d26e510 100644 --- a/templates/openresty/conf.d/site.conf.j2 +++ b/templates/openresty/conf.d/site.conf.j2 @@ -3,6 +3,7 @@ {% set _site_server_name = item.server_name %} {% set _site_root_dir = item.root_dir %} {% set _site_error_pages = item.error_pages %} +{% set _site_error_pages_recursive = item.error_pages_recursive %} {% set _site_access_log = item.access_log %} {% for server in item.servers | default([]) %} @@ -25,6 +26,10 @@ server { error_page {{ error }}; {% endfor %} + {% if _site_error_pages_recursive | default(false) %} + recursive_error_pages on; + {% endif %} + {% for location in server.locations | default([]) %} {% if location.path is defined %} location {{ location.path }} {