From 18f44e335d07ffd6a75fb90d7177e58e13b4d1d1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?cat=20=C3=A6scling?= <11325618-aescling@users.noreply.gitlab.com> Date: Tue, 8 Aug 2023 14:44:12 -0400 Subject: [PATCH] Make default index filename configurable long overdue change --- .../httpd.execline/data/env/httpd_execline_default_index | 1 + .../httpd.execline/data/env/httpd_execline_default_index | 1 + .../httpd.execline/data/env/httpd_execline_default_index | 1 + visible-to-httpd/binaries/httpd.execline | 4 ++-- 4 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 examples/hidden-service-only/httpd.execline/data/env/httpd_execline_default_index create mode 100644 examples/https-with-redirect-and-with-hidden-service/httpd.execline/data/env/httpd_execline_default_index create mode 100644 examples/https-with-redirect/httpd.execline/data/env/httpd_execline_default_index 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} } -- 2.47.3