Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
HowTo: Rewriting HTTP responses
Suppose that you wanted to publish an internal website (http://intranet.mycorp.com/) so that it can be accessed externally (with the correct access controls and security of course!). However, the domain name internal.mycorp.com is not valid externally, and you want to refer to the site via the URL https://extranet.mycorp.com.
One key requirement is to rewrite any HTML that includes references to intranet.mycorp.com, so that they refer to extranet.mycorp.com. The following response rule will do this:
http.getResponseBody() and http.setResponseBody() are all that are required to get and set HTTP responses. These functions take care of the various encodings (e.g. chunk transfer), compression (e.g. gzip) and protocol considerations (e.g. HTTP version, content-length) to ensure that you can reliably manage HTTP responses.