Skip to content

Commit

Permalink
add nginx well known config
Browse files Browse the repository at this point in the history
  • Loading branch information
MaddyUnderStars committed Aug 9, 2023
1 parent cae4c91 commit fe78b80
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions docs/setup/server/wellknown.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"}';
}
```

0 comments on commit fe78b80

Please sign in to comment.