mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Looking for ssowat header in https (workaround for when app is installed on root domain)
This commit is contained in:
parent
5de006f18d
commit
c57e343d45
1 changed files with 5 additions and 2 deletions
|
@ -731,8 +731,11 @@ def _dns_ip_match_public_ip(public_ip, domain):
|
|||
|
||||
def _domain_is_accessible_through_HTTP(ip, domain):
|
||||
try:
|
||||
r = requests.head("http://" + ip, headers={"Host": domain})
|
||||
# Check we got the ssowat header in the response
|
||||
# Check HTTP reachability
|
||||
requests.head("http://" + ip, headers={"Host": domain})
|
||||
|
||||
# Check we got the ssowat header (in HTTPS)
|
||||
r = requests.head("https://" + ip, headers={"Host": domain}, verify=False)
|
||||
if "x-sso-wat" not in r.headers.keys():
|
||||
return False
|
||||
except Exception:
|
||||
|
|
Loading…
Add table
Reference in a new issue