location = /.well-known/host-meta { proxy_pass http://ejabberd:80; proxy_hide_header content-type; add_header content-type 'application/xrd+xml' always; add_header Access-Control-Allow-Origin '*' always; } location = /.well-known/host-meta.json { proxy_pass http://ejabberd:80; proxy_hide_header content-type; add_header content-type 'application/jrd+json' always; add_header Access-Control-Allow-Origin '*' always; }