Publish files at the site root, and find CalDAV from the bare domain
Deploy instance / deploy (push) Successful in 2s
Lint and reload / lint (push) Successful in 2s
Lint and reload / reload (push) Successful in 0s

Portal v0.6.21 serves this repo's .well-known/ at the root of the site,
so security.txt is a file in this repo rather than something only a
reverse proxy could place. A path that is not here answers 404 now,
instead of the app shell answering 200 with HTML.

Caddy also hands /.well-known/caldav and /.well-known/carddav to
Stalwart, which answers each with a 307 to the collection. RFC 6764 has
a client look for these on the domain its address is in - and iOS uses
them, which matters because Apple Mail ignores both autoconfig and
Autodiscover for IMAP accounts and discovers nothing else by itself.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015GeH3y8fwTaTudaD88P57o
This commit is contained in:
Bendik Lynghaug
2026-10-07 10:35:48 +02:00
co-authored by Claude Opus 5
parent 30f9025d40
commit 07d3dc36d3
3 changed files with 19 additions and 2 deletions
+12 -1
View File
@@ -18,7 +18,7 @@ on:
- .gitea/workflows/deploy.yml - .gitea/workflows/deploy.yml
env: env:
PORTAL_RELEASE: v0.6.15 PORTAL_RELEASE: v0.6.21
INSTANCE: uhhm-portal INSTANCE: uhhm-portal
jobs: jobs:
@@ -129,6 +129,17 @@ jobs:
} }
} }
# CalDAV and CardDAV discovery (RFC 6764): a client looks for
# these on the domain its address is in, and Stalwart answers
# each with a 307 to the collection. iOS uses these even though
# Apple Mail ignores autoconfig and Autodiscover entirely.
@dav path /.well-known/caldav /.well-known/carddav
handle @dav {
reverse_proxy stalwart:8080 {
header_up Host mail.{$DOMAIN}
}
}
@autodiscover path /Autodiscover/* /autodiscover/* /AutoDiscover/* @autodiscover path /Autodiscover/* /autodiscover/* /AutoDiscover/*
handle @autodiscover { handle @autodiscover {
reverse_proxy stalwart:8080 { reverse_proxy stalwart:8080 {
+1 -1
View File
@@ -20,7 +20,7 @@ jobs:
# (PORTAL_RELEASE in deploy.yml). # (PORTAL_RELEASE in deploy.yml).
- name: Lint questions - name: Lint questions
env: env:
PORTAL_RELEASE: v0.6.15 PORTAL_RELEASE: v0.6.21
run: | run: |
# The checkout is on a noexec mount for this runner; the cargo # The checkout is on a noexec mount for this runner; the cargo
# target dir is where it may run what it fetched. # target dir is where it may run what it fetched.
+6
View File
@@ -0,0 +1,6 @@
# How to report a security problem with uhhm.no, served from this repo's
# .well-known/ by portal's static root overlay.
Contact: mailto:bl@uhhm.no
Expires: 2027-10-07T00:00:00.000Z
Preferred-Languages: no, en
Canonical: https://uhhm.no/.well-known/security.txt