From 1c02415b6e95c0fbb920fd2bfb5f4b975f1c7fbe Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 25 May 2022 14:59:08 +0200 Subject: l radio: add radio-news.r alias --- lass/2configs/radio/news.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lass/2configs/radio') diff --git a/lass/2configs/radio/news.nix b/lass/2configs/radio/news.nix index a3b39a9ea..5c6c5d33a 100644 --- a/lass/2configs/radio/news.nix +++ b/lass/2configs/radio/news.nix @@ -84,6 +84,16 @@ in { predicate = "-p tcp --dport 7999"; target = "ACCEPT"; } ]; + services.nginx.virtualHosts."radio-news.r" = { + locations."/" = { + proxyPass = "http://localhost:7999"; + proxyWebsockets = true; + extraConfig = '' + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + ''; + }; + }; krebs.htgen.news = { port = 7999; user = { -- cgit v1.2.3