new working solution... for api subdomain