Skip to content
Snippets Groups Projects
Commit 264143ba authored by Jan Alexander Steffens (heftig)'s avatar Jan Alexander Steffens (heftig)
Browse files

Merge branch 'default-type' into 'master'

Use `default_type` instead of `add_header Content-Type`

See merge request !401
parents f3be425a c846e43f
No related branches found
No related tags found
No related merge requests found
......@@ -92,12 +92,12 @@ server {
error_page 503 /503.html;
location /.well-known/matrix/server {
add_header Content-Type application/json;
default_type application/json;
return 200 '{"m.server": "{{ matrix_domain }}:443"}';
}
location /.well-known/matrix/client {
add_header Content-Type application/json;
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '{"m.homeserver": {"base_url": "https://{{ matrix_domain }}"}, "m.identity_server": {"base_url": "https://matrix.org"} }';
}
......
......@@ -114,12 +114,12 @@ server {
ssl_trusted_certificate /etc/letsencrypt/live/{{ archweb_domain }}/chain.pem;
location /.well-known/matrix/server {
add_header Content-Type application/json;
default_type application/json;
return 200 '{"m.server": "{{ matrix_domain }}:443"}';
}
location /.well-known/matrix/client {
add_header Content-Type application/json;
default_type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '{"m.homeserver": {"base_url": "https://{{ matrix_domain }}"}, "m.identity_server": {"base_url": "https://matrix.org"} }';
}
......
......@@ -66,7 +66,7 @@ server {
}
location ~ \.gz$ {
add_header Content-Type text/plain;
default_type text/plain;
add_header Content-Encoding gzip;
expires 5m;
}
......
......@@ -61,13 +61,13 @@ server {
{% endfor %}
location = /metrics {
add_header Content-Type text/plain;
default_type text/plain;
return 200 "Available endpoints:\n{% for ep in matrix_metrics_endpoints %} /metrics/{{ ep.name }}\n{% endfor %}";
}
}
location = / {
add_header Content-Type text/plain;
default_type text/plain;
return 200 "Nothing to see here.";
}
......
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