Nginx return directive in caddy -- return json

Very easy, please see the docs: Caddyfile Directives — Caddy Documentation

handle /.well-known/matrix/client {
    header  Access-Control-Allow-Origin *
    respond `{ "m.homeserver": { "base_url": "domain here" } }`
}
2 Likes