Created
March 3, 2018 03:58
-
-
Save edgars/8cba3284cb4856258a03d43ebe6ba365 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<api xmlns="http://ws.apache.org/ns/synapse" name="TerritoryAPI" context="/debug"> | |
<resource methods="GET" uri-template="/" protocol="http"> | |
<inSequence> | |
<log/> | |
<script language="js"><![CDATA[ | |
importPackage(Packages.java.net); | |
importPackage(Packages.org.apache.log4j); | |
try { | |
var addr = InetAddress.getLocalHost(); | |
if (addr != null) { | |
var hostname = addr.getHostName(); | |
MDC.put("host", hostname); | |
} | |
} catch (e) { | |
} | |
]]></script> | |
<respond/> | |
</inSequence> | |
<outSequence/> | |
<faultSequence/> | |
</resource> | |
</api> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment