Custom HTTP Header
Custom HTTP Header
One example of how a custom header produced by Asset Manager may be useful is if the application is going to be embedded in another 3rd party application using something like HTML <iframe> tags. Since RF Code won't use cookies by default, a custom header will be necessary to add a policy, such as a Compact P3P, to allow the browser to leverage/use the cookies. To do this, the "jetty.xml" file will need to be edited on the Asset Manager. By default, this file is located in the "C:\Program Files\RF Code\Asset Manager\jetty\etc" directory.
Near the end of the file, in the final "<Set name="handler">" section, you'll need to add a custom <item> after the last item.
Here's what the end of the file looks like before the edit:
Here's what it would look like after the edit:
The name and value are arbitrary and can be changed to suit your needs. Once this change is made, the Asset Manager service will need to be restarted.
Near the end of the file, in the final "<Set name="handler">" section, you'll need to add a custom <item> after the last item.
Here's what the end of the file looks like before the edit:
<Set name="handler"> <New class="org.mortbay.jetty.handler.rewrite.RewriteHandler" id="Rewrite"> <Set name="handler"><Ref id="oldhandler"/></Set> <Set name="rewriteRequestURI">true</Set> <Set name="rewritePathInfo">false</Set> <Set name="originalPathAttribute">requestedPath</Set> <Set name="rules"> <Array type="org.mortbay.jetty.handler.rewrite.Rule"> <!-- add a rewrite rule --> <Item> <New class="org.mortbay.jetty.handler.rewrite.RewritePatternRule" id=""> <Set name="pattern">/cgi-bin/nph-nbRmtLinkCGI</Set> <Set name="replacement">/rfcode_zonemgr/cgi-bin/nph-nbRmtLinkCGI</Set> </New> </Item> </Array> </Set> </New> </Set> </Configure>
Here's what it would look like after the edit:
<Set name="handler"> <New class="org.mortbay.jetty.handler.rewrite.RewriteHandler" id="Rewrite"> <Set name="handler"><Ref id="oldhandler"/></Set> <Set name="rewriteRequestURI">true</Set> <Set name="rewritePathInfo">false</Set> <Set name="originalPathAttribute">requestedPath</Set> <Set name="rules"> <Array type="org.mortbay.jetty.handler.rewrite.Rule"> <!-- add a rewrite rule --> <Item> <New class="org.mortbay.jetty.handler.rewrite.RewritePatternRule" id=""> <Set name="pattern">/cgi-bin/nph-nbRmtLinkCGI</Set> <Set name="replacement">/rfcode_zonemgr/cgi-bin/nph-nbRmtLinkCGI</Set> </New> </Item> <Item> <New id="" class="org.mortbay.jetty.handler.rewrite.HeaderPatternRule"> <Set name="pattern">*</Set> <Set name="name">CUSTOM_HEADER</Set> <Set name="value">Value of the header</Set> </New> </Item> </Array> </Set> </New> </Set> </Configure>
The name and value are arbitrary and can be changed to suit your needs. Once this change is made, the Asset Manager service will need to be restarted.