]> Lady’s Gitweb - x_status_git/blobdiff - Caddyfile
Support lookup by identifier
[x_status_git] / Caddyfile
index 5b8aca551673ee1445a0b5358b7538106fad93fa..a430aae06c9d8691e330c11e48c60b98528645ba 100644 (file)
--- a/Caddyfile
+++ b/Caddyfile
@@ -29,6 +29,20 @@ status.site.example {
                header Link </statuses.atom>;rel=alternate;type="application/atom+xml"
        }
 
+       @iri {
+               path_regexp matcher ^/(?P<iri>[^/:]+:[^/]+)/?$
+       }
+
+       handle @iri {
+               handle @bare {
+                       rewrite * /.lookup.xhtml
+               }
+
+               handle @slash {
+                       redir * /{re.matcher.iri}
+               }
+       }
+
        handle /about {
                rewrite * /.about.html
                header Link </about.jsonld>;rel=meta;type="application/ld+json"
This page took 0.017714 seconds and 4 git commands to generate.