Forum Discussion

vijaycloud's avatar
vijaycloud
Former Employee
Jul 02, 2020

Azure Application Gateway- one Header/Domain to redirect to different Applications ?

Hi Experts, One of my customer looking solution. they have only one header/Domain (https://asp.aspr.start.edu.sg/) and want to use that header to different applications (https://asp.aspr.start.edu.sg/spta/) and (https://asp.aspr.start.edu.sg/sms/). Whether it is possible or not inside in App gateway or  if not then what is the workaround?

 

As i know we can host multiple subdomains of the same parent domain on the same application gateway deployment. For example, we can host http://blog.contoso.com and http://app.contoso.com on a single application gateway deployment.

Also know , As per the best practice we should run any Application on its own domain or subdomain, this is also prevent XSS attacks as well. Whenever vulnerability hit one of your apps may result in your whole domain becoming vulnerable. This is the reason security features are generally implemented in the browser on a per-domain basis.

 

Please help , thanks.

Vijay

6 Replies

  • HusseinAwad's avatar
    HusseinAwad
    Copper Contributor
    That's right! Application Gateway can has set of backend pools, and with the path based routing you should be able to direct traffic to different backend pools as required!
  • mfessalifi's avatar
    mfessalifi
    Copper Contributor
    Hi Vijay,
    Now you can also have Rewrite HTTP headers with Application Gateway (it still on preview)
    https://docs.microsoft.com/en-us/azure/application-gateway/rewrite-http-headers
    • vijaycloud's avatar
      vijaycloud
      Former Employee

      Charbelhanna 

      Thanks for reply, I think this will apply only if we have one web application and path based routing can be done on basis of directory path. But in this case They using two diff-diff applications, one is already migrated on cloud (which is running successfully) and second application going to be migrated.

       

      Option 1- We can host multiple subdomains of the same parent domain on the same application gateway deployment. (But customer don't want use subdomain)

       

      Option-2- Application Gateway supports multiple applications each listening on different ports, but this scenario requires the applications to accept traffic on non-standard ports. This is often not a configuration that customer  want.

       

      please correct me if my understanding is wrong..

       

      Thanks.

      Vijay

      • Charbelhanna's avatar
        Charbelhanna
        MCT

        Dear vijaycloud 

         

        I am sorry for the late reply, 

        the application gateway support path based routing for applications that residing on different back-end pools, therefore could respond to your request. it is not required that all applications to reside on a single back-end pool. so in brief you can host multiple applications using the same domain but on different paths and these applications can reside on different back-end pools / servers.

         

        I am intending to write a detailed blog for this purpose and will share it with you once it is ready.

         

        Regards,

        Charbel Hanna

Resources