apache frontend: Ignore empty custom_domain parameter

parent d66df40a
...@@ -88,8 +88,11 @@ class Recipe(BaseSlapRecipe): ...@@ -88,8 +88,11 @@ class Recipe(BaseSlapRecipe):
# Check for custom domain (like mypersonaldomain.com) # Check for custom domain (like mypersonaldomain.com)
# If no custom domain, use generated one. # If no custom domain, use generated one.
domain = slave_instance.get('custom_domain', # Note: if we get an empty custom_domain parameter, we ignore it
"%s.%s" % (reference.replace("-", "").lower(), frontend_domain_name)) domain = slave_instance.get('custom_domain').strip()
if domain is None or domain == '':
domain = "%s.%s" % (reference.replace("-", "").lower(),
frontend_domain_name)
# Define the URL where the instance will be available # Define the URL where the instance will be available
# WARNING: we use default ports (443, 80) here. # WARNING: we use default ports (443, 80) here.
slave_dict[reference] = "%s%s/" % (scheme, domain) slave_dict[reference] = "%s%s/" % (scheme, domain)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment