1
0
mirror of https://github.com/spacebarchat/docs.git synced 2024-11-25 03:33:05 +01:00

add nginx well known config

This commit is contained in:
Madeline 2023-08-09 14:25:29 +10:00
parent cae4c91d11
commit fe78b80337
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47

View File

@ -5,10 +5,21 @@ Instance owners may host a `/.well-known/spacebar` file on a domain containing t
Users can enter a domain, e.g. `spacebar.chat` as shorthand, and their client will query `https://spacebar.chat/.well-known/spacebar` for the instance API URL,
and from there the Gateway and CDN endpoints.
Example `/.well-known/spacebar` file:
For example:
```json
{
"api": "https://api.spacebar.chat/api/v9"
}
```
=== "JSON"
```json
{
"api": "https://api.spacebar.chat/api/v9"
}
```
=== "NGINX"
```nginx
location /.well-known/spacebar {
add_header Access-Control-Allow-Origin *;
return 200 '{"api": "https://api.spacebar.chat/api/v9"}';
}
```