ricsanfre / ansible-role-minio

Ansible role for installing and configuring Minio
https://galaxy.ansible.com/ricsanfre/minio
MIT License
50 stars 22 forks source link

problem with - in dns name #5

Closed epictralala closed 1 year ago

epictralala commented 1 year ago

minio_bucket.py cant work with dns names who have an "-" in the name.

i cant write python but this works for me:

   if m.match(r"^http://([\w./:-]+)"):
        is_https = False
        unschemed_s3_url = m.group(1)

    elif m.match(r"^https://([\w./:-]+)"):
        is_https = True
        unschemed_s3_url = m.group(1)

    elif m.match(r"^(?:[a-zA-Z0-9]+:\/\/)*([\w./:-]+)"):
        is_https = True
        unschemed_s3_url = m.group(1)
ricsanfre commented 1 year ago

Thanks @epictralala. Your changes seem to be ok. I will merge them into the main branch.