From 5f445e8cf578d0e180d50fca1f13e55a3739a39a Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Sat, 29 Jul 2023 17:12:09 -0700 Subject: [PATCH] nixos/matrix-synapse: fix duplicate Content-Type header in example nginx adds a `content-type: application/octet-stream` header by default, and `add_header` does not supplant it. By setting `default_type` instead we avoid the extraneous header. --- nixos/modules/services/matrix/synapse.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/matrix/synapse.md b/nixos/modules/services/matrix/synapse.md index cad91ebf58d5..94d13aa0820b 100644 --- a/nixos/modules/services/matrix/synapse.md +++ b/nixos/modules/services/matrix/synapse.md @@ -30,7 +30,7 @@ let clientConfig."m.homeserver".base_url = "https://${fqdn}"; serverConfig."m.server" = "${fqdn}:443"; mkWellKnown = data: '' - add_header Content-Type application/json; + default_type application/json; add_header Access-Control-Allow-Origin *; return 200 '${builtins.toJSON data}'; '';