Want to check current subdomain in url is valid or not. I'm able to validate if current url has subdomain or not. I want to make an api call from angular to backend with subdomain name and check if its valid. Where will be the best place in angular to do this? app.run ? some factory ?
If valid then only it should display site contents, otherwise redirect to unauthorized page. I also needs to check the current session cookies if they are valid for current subdomain. I guess I can do this by creating cookie for that subdomain only and not global domain cookie, right?