Topic
1 reply Latest Post - ‏2013-07-12T15:01:21Z by swlinn
thotranh
thotranh
66 Posts
ACCEPTED ANSWER

Pinned topic Host Alias in Datapower

‏2013-07-12T14:43:20Z |

I have a question about something that I'm stuck on.

I have a Multi Gateway Protocol in the Datapower Configuration.

Incoming Request uses a Host Alias name :

eg.   https://myhome.com/mycontext     in which myhome.com  is mapped to  11.10.9.8 (for example),.

In the probe , inbound-url is  http://11.10.9.8:443/mycontext

However, I really need to get the value "myhome.com" in a variable so that I can use in one of my transformation XSL to do a redirect .

I tried "var://service/URL-in" , and so on , but all of them only give the actual IP (11.10.9.8), not the name that I use as "Host Alias".

Please let me know if there's a way to grab the DNS value or Host Alias value in datapower in a variable.

Thank you

  • swlinn
    swlinn
    1330 Posts
    ACCEPTED ANSWER

    Re: Host Alias in Datapower

    ‏2013-07-12T15:01:21Z  in response to thotranh

    Get the Host HTTP Request Header, which should contain the domain name used in your url, ie,

    <xsl:variable name="myhost' select="dp:http-request-header('Host')"/>

    Note that you'll have whatever was placed into the url by the client, in your case myhome.com, but if the client explicitly specifies the port, you'll have that as well, eg, myhome.com:443

    Regards,

    Steve