From eb9593a4e5403a91945fb25975369d9dfdbfae69 Mon Sep 17 00:00:00 2001 From: fkwp Date: Wed, 9 Apr 2025 13:16:25 +0200 Subject: [PATCH] add information about CORS headers --- docs/self-hosting.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/self-hosting.md b/docs/self-hosting.md index 424355b2..316bb473 100644 --- a/docs/self-hosting.md +++ b/docs/self-hosting.md @@ -147,6 +147,14 @@ server { ] ``` +Make sure this file is served with the correct MIME type (`application/json`). Additionally, ensure the appropriate CORS headers are set to allow web clients to access it across origins. For more details, refer to the [Matrix Client-Server API: 2. Web Browser Clients](https://spec.matrix.org/latest/client-server-api/#web-browser-clients). + +``` +Access-Control-Allow-Origin: * +Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS +Access-Control-Allow-Headers: X-Requested-With, Content-Type, Authorization +``` + > [!NOTE] > Most `org.matrix.msc4143.rtc_foci` configurations will only have one entry in > the array