Skip to content

Commit

Permalink
Added support for bind_hostname options.
Browse files Browse the repository at this point in the history
See also related wptserve PR w3c/wptserve#10
  • Loading branch information
sideshowbarker committed Mar 7, 2014
1 parent 3aa947d commit f14a2dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config.default.json
Expand Up @@ -4,4 +4,5 @@
"ws":["auto"]},
"external_domain":"w3c-test.org",
"check_subdomains": true,
"log_level":"debug"}
"log_level":"debug",
"bind_hostname": true}
5 changes: 4 additions & 1 deletion serve.py
Expand Up @@ -155,7 +155,8 @@ def start_http_server(config, paths, port):
rewrites=rewrites,
config=config,
use_ssl=False,
certificate=None)
certificate=None,
bind_hostname=bind_hostname)

def start_https_server(config, paths, port):
return
Expand Down Expand Up @@ -306,11 +307,13 @@ def load_config(default_path, override_path=None):

def main():
global logger
global bind_hostname

config = load_config("config.default.json",
"config.json")

logger = default_logger(config["log_level"])
bind_hostname = config["bind_hostname"]

config_, servers = start(config)

Expand Down

0 comments on commit f14a2dd

Please sign in to comment.