diff options
-rw-r--r-- | krebs/3modules/lass/default.nix | 1 | ||||
-rw-r--r-- | lass/2configs/paste.nix | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix index 05be3ca3e..b19e2e6fc 100644 --- a/krebs/3modules/lass/default.nix +++ b/krebs/3modules/lass/default.nix @@ -21,6 +21,7 @@ in { "krebsco.de" = '' cache IN A ${nets.internet.ip4.addr} p IN A ${nets.internet.ip4.addr} + c IN A ${nets.internet.ip4.addr} paste IN A ${nets.internet.ip4.addr} prism IN A ${nets.internet.ip4.addr} ''; diff --git a/lass/2configs/paste.nix b/lass/2configs/paste.nix index 98ba7c731..68a55c71c 100644 --- a/lass/2configs/paste.nix +++ b/lass/2configs/paste.nix @@ -36,6 +36,22 @@ with import <stockholm/lib>; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; ''; }; + services.nginx.virtualHosts."c.krebsco.de" = { + enableACME = true; + addSSL = true; + serverAliases = [ "c.krebsco.de" ]; + locations."/".extraConfig = '' + if ($request_method != GET) { + return 403; + } + proxy_set_header Host $host; + proxy_pass http://127.0.0.1:${toString config.krebs.htgen.cyberlocker.port}; + ''; + extraConfig = '' + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + ''; + }; services.nginx.virtualHosts."p.krebsco.de" = { enableACME = true; addSSL = true; |