x-forwarded-host – Header

We have a requirement in the ReSt application to generate a hyperlink to one of web pages in the pdf file. For that we would want to get the host name of the environment where the application is running. The request flow is like below,
user => Web application =>ReSt application.

The x-forwarded-host header contains the domain name of the application. We use this in our code and able to generate the link

        String host = httpServletRequest.getHeader("x-forwarded-host");


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s