]> cat aescling's git repositories - httpd-execline.git/commitdiff
Make default index filename configurable
authorcat æscling <11325618-aescling@users.noreply.gitlab.com>
Tue, 8 Aug 2023 18:44:12 +0000 (14:44 -0400)
committercat æscling <11325618-aescling@users.noreply.gitlab.com>
Tue, 8 Aug 2023 18:44:12 +0000 (14:44 -0400)
long overdue change

examples/hidden-service-only/httpd.execline/data/env/httpd_execline_default_index [new file with mode: 0644]
examples/https-with-redirect-and-with-hidden-service/httpd.execline/data/env/httpd_execline_default_index [new file with mode: 0644]
examples/https-with-redirect/httpd.execline/data/env/httpd_execline_default_index [new file with mode: 0644]
visible-to-httpd/binaries/httpd.execline

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 (file)
index 0000000..64233a9
--- /dev/null
@@ -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 (file)
index 0000000..64233a9
--- /dev/null
@@ -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 (file)
index 0000000..64233a9
--- /dev/null
@@ -0,0 +1 @@
+index.html
\ No newline at end of file
index 24f6fc5bf58b9d9a15b7e1ce842f7641b5f80e3b..ace93e05288b32e34dbfab846fb5844442e412f4 100755 (executable)
@@ -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}
        }