<?xml version="1.0" encoding="UTF-8"?>
<spring:beans xmlns="http://membrane-soa.org/proxies/1/"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:web="http://membrane-soa.org/war/1/"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd http://membrane-soa.org/proxies/1/ http://membrane-soa.org/schemas/proxies-1.xsd http://membrane-soa.org/war/1/ http://membrane-soa.org/schemas/war-1.xsd">
<router hotDeploy="false">
<web:servletTransport id="transport" removeContextRoot="true" />
<serviceProxy>
<reverseProxying />
<response>
<!-- replace html <base href="/"/> tag with <base href="/survey123/"/> -->
<regExReplacer
regex="<base\s+href\s*=\s*\"/\"\s*[\s/]*?>"
replace="<base href="/survey123/" />" />
</response>
<!-- works for /survey123/ but not without trailing slash /survey123 -->
<target host="upstream-server.domain.local" port="5443">
<ssl />
</target>
<!-- works for /survey123 but javascript Content-Type response are incorrect -->
<!-- Direct to 5443 gives
Content-Type: application/javascript; charset=UTF-8
Proxy instead gives
Content-Type: text/html;charset=UTF-8
-->
<target url="https://upstream-server.domain.local:5443/">
<ssl />
</target>
</serviceProxy>
</router>
</spring:beans>