Skip to content
Snippets Groups Projects
Unverified Commit 8ca120df authored by Daniele Sluijters's avatar Daniele Sluijters Committed by GitHub
Browse files

INSTALL: Fix setting content-type on well-known (#8793)


When using `add_header` nginx will literally add a header. If a
`content-type` header is already configured (for example through a
server wide default), this means we end up with 2 content-type headers,
like so:

```
content-type: text/html
content-type: application/json
access-control-allow-origin: *
```

That doesn't make sense. Instead, we want the content type of that
block to only be `application/json` which we can achieve using
`default_type` instead.

Signed-off-by: default avatarDaniele Sluijters <daenney@users.noreply.github.com>
parent 476b8c0a
No related branches found
No related tags found
No related merge requests found
......@@ -487,7 +487,7 @@ In nginx this would be something like:
```
location /.well-known/matrix/client {
return 200 '{"m.homeserver": {"base_url": "https://<matrix.example.com>"}}';
add_header Content-Type application/json;
default_type application/json;
add_header Access-Control-Allow-Origin *;
}
```
......
Fix the example on how to set the `Content-Type` header in nginx for the Client Well-Known URI.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment