From: Clinton Ebadi Date: Tue, 8 Jan 2019 02:09:34 +0000 (-0500) Subject: apache: support mod_dir DirectorySlash X-Git-Tag: release_20190107 X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/commitdiff_plain/129d3b575680d8d5f73162442b0a3f5cfdfbb595 apache: support mod_dir DirectorySlash Also update copyright, including past years I forgot to update. --- diff --git a/lib/apache_options.dtl b/lib/apache_options.dtl index 47753ab..f304f13 100644 --- a/lib/apache_options.dtl +++ b/lib/apache_options.dtl @@ -21,6 +21,15 @@ extern val directoryIndex : [no_spaces] -> [^Vhost]; {{Give the list of filenames to try for the default page of a directory, to be considered in the order given.}} +extern val directorySlash : bool -> [^Vhost]; +{{Determine whether Apache should redirect requests for directories + lacking a trailing slash to include the trailing slash. Enabled by + default, and should only be disabled if you know what you are doing. + See the Apache + documentation for the security implications of disabling the + redirection.}} + extern val forceType : no_spaces -> [Location]; extern val forceTypeOff : [Location]; {{Force all files in the current directory to be served with the given MIME diff --git a/src/plugins/apache.sml b/src/plugins/apache.sml index 1a89983..20bd7ed 100644 --- a/src/plugins/apache.sml +++ b/src/plugins/apache.sml @@ -1,6 +1,6 @@ (* HCoop Domtool (http://hcoop.sourceforge.net/) * Copyright (c) 2006-2009, Adam Chlipala - * Copyright (c) 2013 Clinton Ebadi + * Copyright (c) 2013,2014,2015,2017,2018,2019 Clinton Ebadi * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -887,6 +887,13 @@ val () = Env.action_one "directoryIndex" app (fn opt => (write " "; write opt)) opts; write "\n")) +val () = Env.action_one "directorySlash" + ("enable", Env.bool) + (fn enable => + (write "\tDirectorySlash "; + if enable then write "On" else write "Off"; + write "\n")) + val () = Env.action_one "serverAliasHost" ("host", Env.string) (fn host =>