guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: hydra: goggles: Listen to 127.0.0.1.


From: Ludovic Courtès
Subject: branch master updated: hydra: goggles: Listen to 127.0.0.1.
Date: Sat, 27 Jun 2020 15:51:44 -0400

This is an automated email from the git hooks/post-receive script.

civodul pushed a commit to branch master
in repository maintenance.

The following commit(s) were added to refs/heads/master by this push:
     new 9cabe7a  hydra: goggles: Listen to 127.0.0.1.
9cabe7a is described below

commit 9cabe7a053a15b5ccfb17de6893e5d4836b50cf1
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sat Jun 27 21:50:11 2020 +0200

    hydra: goggles: Listen to 127.0.0.1.
    
    That way, goggles can only be accessed through nginx, which filters out
    issues such as connections kept alive forever.
    
    * hydra/goggles.scm (%config): Change 'host to "127.0.0.1".
    (main): Honor the 'host key of %CONFIG.
---
 hydra/goggles.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/hydra/goggles.scm b/hydra/goggles.scm
index ecd4fb8..cf3c9d6 100755
--- a/hydra/goggles.scm
+++ b/hydra/goggles.scm
@@ -21,7 +21,7 @@
 (define %log-xapian-db "/var/cache/logs.xapian/")
 
 (define %config
-  '((host . "0.0.0.0")
+  '((host . "127.0.0.1")
     (port . 3333)
     (channels . ("guix" "guile" "bootstrappable"))))
 
@@ -491,8 +491,9 @@ freenode." channel))
                (assoc-ref %config 'channels))
      #t)
     (_
-     (let ((port (assoc-ref %config 'port)))
+     (let ((port (assoc-ref %config 'port))
+           (host (assoc-ref %config 'host)))
        (run-server handler
                    'http
-                   `(#:addr ,INADDR_ANY
+                   `(#:addr ,(inet-pton AF_INET host)
                      #:port ,port))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]