summaryrefslogtreecommitdiff
path: root/config.toml.sample
diff options
context:
space:
mode:
Diffstat (limited to 'config.toml.sample')
-rw-r--r--config.toml.sample23
1 files changed, 22 insertions, 1 deletions
diff --git a/config.toml.sample b/config.toml.sample
index cdbe8bf..3f22149 100644
--- a/config.toml.sample
+++ b/config.toml.sample
@@ -51,6 +51,11 @@ assume_index = true
dir_listing = false
# otherwise the fallback is 'application/octet-stream' (gemini is primary text based so 'octet-stream' probably not wanted)
default_mime = 'text/plain'
+# redirection allows this program to check for vhost redirect values.
+# 'no' meaning, no redirection.
+# 'simple', which is simply "if 'x' key exist, return the value for it"
+# 'regex' which is a bit more complex and uses Perl's built in regualar expression. See the vhost for an example of one.
+redirection = 'simple'
### Not implimented yet
# similar to .htaccess, .gmiaccess
@@ -75,7 +80,7 @@ assume_index = true
# bind can be set to a string or a list or 'no' which will not be accessible via IP address.
#bind = ['172.16.0.53', '10.43.14.32']
#ports = [10000,10001,10002]
-# example.com can only be accesed through this socket, other vhost
+# example.com can only be accesed through this socket, other vhost can use it too.
# unix can be set to some path or to 'no' which will not include it in default's unix path if it is set.
#unix = '/some/other/path/to/unix.sock'
#auto_cert = false
@@ -91,3 +96,19 @@ assume_index = true
#assume_index = true
#dir_listing = true
#default_mime = 'text/plain'
+#
+#redirection = 'regex'
+#redirect = {
+# # note the beginning '/'.
+# # The regex is complied like so: qr{^...$} (^ = beginning of line, $ = end of line)
+# # In other words, the entire key value MUST match.
+# # this one would be a simple redirection
+# '/redirect' = 'gemini://my-other-example.com',
+#
+# # these are Perl's regular expression.
+# '/share/some_(.*)' = "/share/",
+# # $1
+# '/blog/2022/dec/(.+)' = '/blog/2022/jul/$1',
+# # $1 $2 $3
+# '/blog/(20..)/(.+)/(.+)' = '/newsgroup/$1-$2/$3',
+# }