From: cat æscling <11325618-aescling@users.noreply.gitlab.com> Date: Tue, 8 Aug 2023 18:44:12 +0000 (-0400) Subject: Make default index filename configurable X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=18f44e335d07ffd6a75fb90d7177e58e13b4d1d1;p=httpd-execline.git Make default index filename configurable long overdue change --- diff --git a/examples/hidden-service-only/httpd.execline/data/env/httpd_execline_default_index b/examples/hidden-service-only/httpd.execline/data/env/httpd_execline_default_index new file mode 100644 index 0000000..64233a9 --- /dev/null +++ b/examples/hidden-service-only/httpd.execline/data/env/httpd_execline_default_index @@ -0,0 +1 @@ +index.html \ No newline at end of file diff --git a/examples/https-with-redirect-and-with-hidden-service/httpd.execline/data/env/httpd_execline_default_index b/examples/https-with-redirect-and-with-hidden-service/httpd.execline/data/env/httpd_execline_default_index new file mode 100644 index 0000000..64233a9 --- /dev/null +++ b/examples/https-with-redirect-and-with-hidden-service/httpd.execline/data/env/httpd_execline_default_index @@ -0,0 +1 @@ +index.html \ No newline at end of file diff --git a/examples/https-with-redirect/httpd.execline/data/env/httpd_execline_default_index b/examples/https-with-redirect/httpd.execline/data/env/httpd_execline_default_index new file mode 100644 index 0000000..64233a9 --- /dev/null +++ b/examples/https-with-redirect/httpd.execline/data/env/httpd_execline_default_index @@ -0,0 +1 @@ +index.html \ No newline at end of file diff --git a/visible-to-httpd/binaries/httpd.execline b/visible-to-httpd/binaries/httpd.execline index 24f6fc5..ace93e0 100755 --- a/visible-to-httpd/binaries/httpd.execline +++ b/visible-to-httpd/binaries/httpd.execline @@ -73,10 +73,10 @@ if -X -n -t { } define candidate_resource ${hostname}/${without_dot_and_dot_dot} - # `${directory}` -> `${directory}/index.xhtml` + importas -D "index.html" default_index httpd_execline_default_index ifelse { eltest -d \${candidate_resource} } { - s6-echo -n -- ${candidate_resource}/index.xhtml + s6-echo -n -- ${candidate_resource}/${default_index} } s6-echo -n -- ${candidate_resource} }