X-Git-Url: https://git.ladys.computer/x_status_git/blobdiff_plain/e2db8c2a3219ec8e97cef6529fe4be9d07f8b392..5d3d36f31fdfd8ad151fa2b2c4ca0f6e1301db8e:/Caddyfile?ds=inline diff --git a/Caddyfile b/Caddyfile index 5b8aca5..95fed0e 100644 --- a/Caddyfile +++ b/Caddyfile @@ -29,6 +29,21 @@ status.site.example { header Link ;rel=alternate;type="application/atom+xml" } + @iri { + path_regexp matcher ^/(?P[^/:]+:[^/]+)/?$ + } + + 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 ;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