java - Spring - Host reference is HTTP on an HTTPS server -


i have 2 springserver servers;

http

<bean id="server" class="org.restlet.ext.spring.springserver">     <constructor-arg value="http" />     <constructor-arg value="${server.port}" />     <property name="parameters">         <props>             <prop key="tracing">false</prop>         </props>     </property> </bean> 

https

<bean id="httpsserver" class="org.restlet.ext.spring.springserver">   <constructor-arg value="https" />   <property name="parameters">     <props>       <prop key="sslcontextfactory">org.restlet.engine.ssl.defaultsslcontextfactory</prop>       <prop key="keystorepath">c:/store/ks.jks</prop>       <prop key="keystorepassword">pwd</prop>       <prop key="keypassword">pwd</prop>       <prop key="keystoretype">jks</prop>    </props>  </property> </bean> 

i load these servers springcomponent:

<bean id="component" class="org.restlet.ext.spring.springcomponent">  <property name="serverslist">     <list>       <ref bean="server" />       <ref bean="httpsserver"/>     </list>  </property>  <property name="clientslist">     <list>      <value>file</value>      <value>clap</value>      <value>http</value>      <value>https</value>     </list>  </property>  <property name="defaulthost" ref="defaulthost" /> </bean> 

my problem host reference http://localhost when on https. causing timeouts on chrome because of content security policies has.

sample output:

2017-04-06 15:27:38 0:0:0:0:0:0:0:1 - - 443 /client/app/partials/login.html - 200 1850 0 1 http://localhost mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, gecko) chrome/57.0.2987.133 safari/537.36 https://localhost/app/login

according restlet's change log, on older versions caused https server not registered. upgrading restlet 2.3.9 fixed problem.


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -