fix: matrix rtc mapping

This commit is contained in:
Katharina Heidenreich 2026-04-06 13:22:22 +02:00
parent 1a3d1f1fdd
commit 20f8049d64
4 changed files with 49 additions and 15 deletions

View file

@ -241,6 +241,14 @@ let
route.content.contentType
else
"text/plain; charset=utf-8";
inlineHeaders =
if builtins.isAttrs route.content && route.content ? headers then
route.content.headers
else
{};
inlineHeaderLines = lib.concatStringsSep "\n" (
lib.mapAttrsToList (name: value: " add_header ${name} ${builtins.toJSON value} always;") inlineHeaders
);
in
{
name = "= ${route.endpoint}";
@ -248,6 +256,7 @@ let
return = "${toString inlineStatus} ${builtins.toJSON inlineBody}";
extraConfig = ''
default_type ${inlineContentType};
${lib.optionalString (inlineHeaderLines != "") inlineHeaderLines}
'';
};
}