I hereby claim:
- I am pauloprea on github.
- I am paul_oprea (https://keybase.io/paul_oprea) on keybase.
- I have a public key ASDqfzlvX3Ri1jTSkV2MZixXY0KYgq4Jo9kB9_UKJIUEUgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import re | |
import boto3 | |
def is_valid_host(host): | |
if len(host) > 255: | |
return False | |
if host[-1] == ".": | |
host = host[:-1] | |
allowed = re.compile("(?!-)[A-Z\d-]{1,63}(?<!-)$", re.IGNORECASE) | |
return all(allowed.match(x) for x in host.split(".")) |