add support for local secure (and implicit from request)  and cdn_subdomain