]> Lady’s Gitweb - x_status_git/blobdiff - Caddyfile
Use titles in prev & next links on statuses
[x_status_git] / Caddyfile
index 5b8aca551673ee1445a0b5358b7538106fad93fa..95fed0ebb752326a97fed18094d2376987ea60b7 100644 (file)
--- a/Caddyfile
+++ b/Caddyfile
@@ -29,6 +29,21 @@ 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
+                       header Cache-Control max-age=0
+               }
+
+               handle @slash {
+                       redir * /{re.matcher.iri}
+               }
+       }
+
        handle /about {
                rewrite * /.about.html
                header Link </about.jsonld>;rel=meta;type="application/ld+json"
@@ -138,7 +153,10 @@ status.site.example {
                }
        }
 
-       header Access-Control-Allow-Origin "*"
+       header {
+               Access-Control-Allow-Origin "*"
+               ?Cache-Control max-age=3600
+       }
 
        file_server {
                index index.xml index.xhtml index.html index.rdf index.txt
This page took 0.049112 seconds and 4 git commands to generate.