Tip:
There could be certain scenarios where you don't want to expose Adeptia infrastructure while publishing any WebService URL to public or you want to make the WS published URL easy to remember.
To overcome this concern, the default Adeptia WebServer's URL can be redirected to a preferred URL.
Adeptia URL: https://xyz.com/adeptia/wsapi/status
Preferred URL: https://xyz.com/request/status
Trick:
The Redirect of default URL to the preferred URL can be done by adding the below snippet in the existing jetty.xml file present at the location (.\AdeptiaServer\ServerKernel\etc\jetty).
The snippet needs to be added in HandlerCollection while setting Handlers (Add just below the Array under "Set handler Collection Structure" section) as shown in the attached screenshot.
Snippet:-
<New id="Rewrite" class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
<Set name="rewriteRequestURI">true</Set>
<Set name="rewritePathInfo">true</Set>
<Set name="originalPathAttribute">requestedPath</Set>
<Set name="handler">
<New class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="contextPath">/adeptia</Set>
<Set name="war"><SystemProperty name="jetty.home" default="."/>/web</Set>
</New>
</Set>
<Call name="addRule">
<Arg>
<New class="org.eclipse.jetty.rewrite.handler.RewritePatternRule">
<Set name="pattern">/***the url to be re-written****</Set>
<Set name="replacement">/*****the replacement url******</Set>
</New>
</Arg>
</Call>
</New>
</Item>
Note:- Please restart Webrunner services to bring the changes into effect.
There could be possibilities where you couldn't rewrite the regex URl/rule. In those scenarios, you can use ARR(Application Request Routing) feature of IIS to route any requests.
https://www.iis.net/downloads/microsoft/application-request-routing
Comments
0 comments
Article is closed for comments.