| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -98,7 +98,7 @@ def initialize(self, things, hosts): | |||
| 98 | 98 | def prepare(self): | |
| 99 | 99 | """Validate Host header.""" | |
| 100 | 100 | host = self.request.headers.get('Host', None) | |
| 101 | - if host is not None and host in self.hosts: | ||
| 101 | + if host is not None and host.lower() in self.hosts: | ||
| 102 | 102 | return | |
| 103 | 103 | ||
| 104 | 104 | raise tornado.web.HTTPError(403) | |
@@ -605,7 +605,7 @@ def __init__(self, things, port=80, hostname=None, ssl_options=None): | |||
| 605 | 605 | self.hostname = hostname | |
| 606 | 606 | self.ip = get_ip() | |
| 607 | 607 | ||
| 608 | - system_hostname = socket.gethostname() | ||
| 608 | + system_hostname = socket.gethostname().lower() | ||
| 609 | 609 | self.hosts = [ | |
| 610 | 610 | '127.0.0.1', | |
| 611 | 611 | '127.0.0.1:{}'.format(self.port), | |
@@ -618,6 +618,7 @@ def __init__(self, things, port=80, hostname=None, ssl_options=None): | |||
| 618 | 618 | ] | |
| 619 | 619 | ||
| 620 | 620 | if self.hostname is not None: | |
| 621 | + self.hostname = self.hostname.lower() | ||
| 621 | 622 | self.hosts.extend([ | |
| 622 | 623 | self.hostname, | |
| 623 | 624 | '{}:{}'.format(self.hostname, self.port), | |
| Back | FazBrowse Home | New Git URL |
0 commit comments