fix is_saas_domain to work for both apex & www

modified:   make_post_sell/request_methods.py
This commit is contained in:
Russell Ballestrini 2022-05-30 12:02:23 -04:00
parent 603e892d4f
commit 501210861c

View file

@ -180,12 +180,9 @@ def includeme(config):
* show only certain buttons on the SaaS domain.
"""
root_domain = request.app.get("root_domain")
return (
root_domain
and request.domain.endswith(root_domain)
and request.app_domain == root_domain
)
if root_domain:
return request.domain.endswith(root_domain)
return False
# Register functions to app config as request methods.
# To prevent multiple DB lookups, cache result with `reify=True`.