summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-05-25 14:59:08 +0200
committerlassulus <lassulus@lassul.us>2022-05-25 14:59:08 +0200
commit1c02415b6e95c0fbb920fd2bfb5f4b975f1c7fbe (patch)
tree7824196d51e8572152e06b87f5bb1dfc383454dd
parentd8aa730baf1f9b6096edd3dc38927f1374c7121e (diff)
l radio: add radio-news.r alias
-rw-r--r--krebs/3modules/lass/default.nix1
-rw-r--r--lass/2configs/radio/news.nix10
2 files changed, 11 insertions, 0 deletions
diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix
index a0518a068..b05e774b4 100644
--- a/krebs/3modules/lass/default.nix
+++ b/krebs/3modules/lass/default.nix
@@ -129,6 +129,7 @@ in {
"c.r"
"p.r"
"search.r"
+ "radio-news.r"
];
tinc.port = 655;
tinc = {
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 = {