Skip to content

Commit

Permalink
fix nginx configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
brainrake committed Oct 22, 2024
1 parent 18ba7c7 commit 5846def
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/services/http-proxy.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ in {
return = "200 ${service.version}";
extraConfig = "add_header Content-Type text/plain;";
};
"/" = mkIf (service.port != null) {
"/" = mkIf (service.servers != [] && service.port != null) {
proxyWebsockets = true;
proxyPass = "http://${service.name}";
};
Expand Down Expand Up @@ -113,7 +113,7 @@ in {

statusPage = true;

upstreams = mapAttrs (_: cfg._mkUpstream) (lib.filterAttrs (_: s: s.port != null) cfg.services);
upstreams = mapAttrs (_: cfg._mkUpstream) (lib.filterAttrs (_: s: s.servers != [] && s.port != null) cfg.services);
virtualHosts = mapAttrs (_: cfg._mkVirtualHost) cfg.services;
};
};
Expand Down

0 comments on commit 5846def

Please sign in to comment.