Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Is it possible to use one domain / certificate for back-end/front-end #10967


User avatar
0
ian1908 created

Using the latest version of anuglar/c# in seperate projects.

Would like to know if it is possible to do the following:

for backend https://{TENANCY_NAME}.api.mydomain.com for frontend https://{TENANCY_NAME}.mydomain.com

And if the above would be possible? Would the backend host https://api.mydomain.com not route to the frontend?

Thank you


2 Answer(s)
  • User Avatar
    0
    sedulen created

    Hi @ian1908,

    Sorry - I thought I'd replied a few hours ago. Not sure if I forgot to click the "Add answer" button or what exactly happened. Anyway.

    Unfortunately what you are trying to do is not possible with a single SSL certificate. you can get a wildcard SSL certificate for * .mydomain.com but that doesn't get you what you need for api.mydomain.com

    Traditionally what you'd do is put a load balancer or proxy in front of those frontend and backend services, and have that gateway resource handle "path based routing" to the correct backend resource.

    I've done this before using HA Proxy pretty easily. Or if you are hosting in Azure, this is exactly what an Azure Application Gateway is for.

    Another option would be to deploy your API as api.mydomain.com, and to use ANZ's built-in tenancy resolution to resolve the tenant either via Header or Cookie, rather than through DNS.

    I hope that helps. -Brian

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks @sedulen :)