From b2bfb08efa6abfd007807052f82785258f527b04 Mon Sep 17 00:00:00 2001 From: "Gustavo L de Mello (Guz)" Date: Fri, 4 Apr 2025 22:12:18 -0300 Subject: [PATCH] feat(medama,modules): support for cors policy --- modules/medama.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/medama.nix b/modules/medama.nix index 85afb79..19b1322 100644 --- a/modules/medama.nix +++ b/modules/medama.nix @@ -14,6 +14,11 @@ in { type = with types; port; default = 8080; }; + cors = mkOption { + type = with types; listOf str; + default = []; + apply = v: concatStringsSep "," v; + }; }; config = mkIf cfg.enable { virtualisation.oci-containers.containers.medama = { @@ -26,6 +31,7 @@ in { environment = { AUTO_SLL = toString cfg.ssl; PORT = toString cfg.port; + CORS_ALLOWED_ORIGINS = cfg.cors; }; }; };