fix: matrix rtc mapping
This commit is contained in:
parent
1a3d1f1fdd
commit
20f8049d64
4 changed files with 49 additions and 15 deletions
|
|
@ -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}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue