summaryrefslogtreecommitdiffstats
path: root/lass/2configs/services/radio/proxy.nix
blob: 49f8ade7927b1ef275f0e02075a3f2f5ca7e0de7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{ config, pkgs, ... }:
{
  services.nginx.virtualHosts."radio.lassul.us" = {
    enableACME = true;
    addSSL = true;
    locations."/" = {
      # recommendedProxySettings = true;
      proxyWebsockets = true;
      proxyPass = "http://radio.r";
      extraConfig = ''
        proxy_set_header Host radio.r;
        # get source ip for weather reports
        proxy_set_header user-agent "$http_user_agent; client-ip=$remote_addr";
      '';
    };
  };
}