Add bind_host setting requested by Artemis

This commit is contained in:
Cadence Ember 2023-03-08 22:53:07 +13:00
parent 29007b0e29
commit e0fec5fa9c
Signed by: cadence
GPG key ID: BC1C2C61CF521B17
3 changed files with 8 additions and 3 deletions

View file

@ -30,7 +30,9 @@
(define ch (make-channel)) (define ch (make-channel))
(define (start) (define (start)
(serve/launch/wait (serve/launch/wait
#:listen-ip (if (config-true? 'debug) "127.0.0.1" #f) #:listen-ip (if (equal? (config-get 'bind_host) "auto")
(if (config-true? 'debug) "127.0.0.1" #f)
(config-get 'bind_host))
#:port (string->number (config-get 'port)) #:port (string->number (config-get 'port))
(λ (quit) (λ (quit)
(channel-put ch (lambda () (semaphore-post quit))) (channel-put ch (lambda () (semaphore-post quit)))

View file

@ -20,7 +20,9 @@
(require (only-in "src/page-file.rkt" page-file)) (require (only-in "src/page-file.rkt" page-file))
(serve/launch/wait (serve/launch/wait
#:listen-ip (if (config-true? 'debug) "127.0.0.1" #f) #:listen-ip (if (equal? (config-get 'bind_host) "auto")
(if (config-true? 'debug) "127.0.0.1" #f)
(config-get 'bind_host))
#:port (string->number (config-get 'port)) #:port (string->number (config-get 'port))
(λ (quit) (λ (quit)
(dispatcher-tree (dispatcher-tree

View file

@ -29,12 +29,13 @@
(define default-config (define default-config
'((application_name . "BreezeWiki") '((application_name . "BreezeWiki")
(bind_host . "auto")
(port . "10416")
(canonical_origin . "") (canonical_origin . "")
(debug . "false") (debug . "false")
(feature_search_suggestions . "true") (feature_search_suggestions . "true")
(instance_is_official . "false") ; please don't turn this on, or you will make me very upset (instance_is_official . "false") ; please don't turn this on, or you will make me very upset
(log_outgoing . "true") (log_outgoing . "true")
(port . "10416")
(strict_proxy . "false") (strict_proxy . "false")
(feature_offline::enabled . "false") (feature_offline::enabled . "false")