2014-09-12 60 views
0

我使用Websphere Portal并试图通过Proxy发出AJAX请求,但获取404状态码。
通过代理提交请求时删除自定义标头

当我发出以下我的自定义页眉设置请求我得到404

GET http://proxy.com:10039/wps/proxy/https/server.com/cart/@self 

但如果我发出通过代理不路由相同的请求,我得到200

GET https://server.com/cart/@self 

为什么代理删除我的标题?

我登录目标服务器上的所有页眉和看到,当他们通过代理的头被实际删除:

{accept=*/*, accept-encoding=gzip,deflate,sdch, accept-language=en-US,en;q=0.8, cache-control=no-cache, connection=keep-alive, host=server.com, pragma=no-cache, user-agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36} 

这里是我的代理配置:

<policy url="{$digital_data_connector_policy}" basic-auth-support="true" name="digital_data_connector"> 
    <actions> 
     <method>GET</method> 
     <method>HEAD</method> 
     <method>POST</method> 
     <method>DELETE</method> 
     <method>PUT</method> 
    </actions> 
    <headers> 
     <header>User-Agent</header> 
     <header>Accept*</header> 
     <header>Content*</header> 
     <header>Authorization*</header> 
     <header>Set-Cookie</header> 
     <header>If-Modified-Since</header> 
     <header>If-None-Match</header> 
     <header>If-Unmodified-Since</header> 
     <header>X-Method-Override</header> 
     <header>Set-Cookie</header> 
     <header>MyCustomToken</header> 
     <header>MyCustomTokenPart2</header> 
    </headers> 
    <meta-data> 
     <name>forward-http-errors</name> 
     <value>true</value> 
    </meta-data> 
    <meta-data> 
     <name>forward-credentials-from-vault</name> 
     <value>true</value> 
    </meta-data> 
</policy> 

回答

0

我改变proxy-config.xmlupdate-outbound-http-connection-config任务运行之前没有拿起。

相关问题