On Tuesday, April 30, 2019, 7:58:03 PM EDT, [email protected] 
<[email protected]> wrote:  
 
 Hi All,  
   I am using 0.12 version of Knox and configured a service to be proxied 
through knox as listed below:
   My Topology is :
   <topology>    <gateway>        <provider>            <role>webappsec</role>  
          <name>WebAppSec</name>            <enabled>true</enabled>            
<param>                <name>cors.enabled</name>                
<value>true</value>              </param>              <param>                  
  <name>cors.supportedMethods</name>                    
<value>GET,HEAD,POST,OPTIONS,PUT</value>               </param>                
<param>                        <name>xframe.options.enabled</name>              
          <value>true</value>                </param>                <param>    
                    <name>xframe.options</name>                        
<value>SAMEORIGIN</value>                </param>        </provider>       
<provider>            <role>identity-assertion</role>            
<name>Default</name>            <enabled>true</enabled>        </provider>
        <service>            <role>MYSERVICE</role>            
<url>http://localhost:9090</url>        </service></topology>
and the Service it self is described as
<service role="MYSERVICE" name="myservice" version="0.0.1">
        <policies>            <policy role="webappsec"/>            <policy 
role="authentication" name="Anonymous"/>            <policy role="rewrite"/>    
        <policy role="authorization"/>        </policies>
        <routes>            <route path="/myservice"/>            <route 
path="/myservice/**"/>        </routes>
        <dispatch 
classname="org.apache.hadoop.gateway.dispatch.PassAllHeadersDispatch"/>
</service>
<rules>        <rule dir="IN" name="MYSERVICE/ myservice/inbound" 
pattern="*://*:*/**/ myservice/{path=**}?{**}">            <rewrite 
template="{$serviceUrl[MYSERVICE]}/{path=**}?{**}"/>        </rule>

        <rule dir="IN" name="MYSERVICE/myservice/inbound/root" 
pattern="*://*:*/**/myservice/">            <rewrite 
template="{$serviceUrl[MYSERVICE]}/"/>        </rule>                <rule 
dir="IN" name="MYSERVICE/myservice/inbound/path" 
pattern="*://*:*/**/myservice/{**}">            <rewrite 
template="{$serviceUrl[MYSERVICE]}/{**}"/>        </rule>
</rules>

When i tried access the Service GET Requests are working as expected. POST 
requests are also routed to the service how ever the POST Body is not getting 
sent to the target service. Not sure what's the issue is.
ThanksSateesh
  

Reply via email to