Passing Custom Headers Through Proxy

111 visualizações
Pular para a primeira mensagem não lida

brucepa...@gmail.com

não lida,
12 de dez. de 2012, 13:06:0812/12/2012
para membrane...@googlegroups.com
How do I get Membrane to pass additional custom headers that we add through to the real service?

Thomas Bayer

não lida,
12 de dez. de 2012, 13:48:1812/12/2012
para membrane-monitor
Hi Bruce,
usually Membrane will pass most of the HTTP headers in a request to
the service. If you want to filter a header you can use the header-
filter interceptor. See:

http://www.membrane-soa.org/esb-doc/3.5/configuration/reference/header-filter.htm

To debug what headers are send by the client and what headers are
passed to the service you can add a log interceptor to your service
proxy. Like:

<serviceProxy port="2000">
<log/>
<target host="thomas-bayer.com" port="80"/>
</serviceProxy>

Please post the part of the log showing the headers if you want more
specific help.

If you want to set a header in Membrane you can do this as shown in
the following code:


<serviceProxy port="2000">
<request>
<groovy>
exc.response.header.addHeader("MyCustomHeader","my value" )
</groovy>
</request>
<target host="thomas-bayer.com" port="80"/>
</serviceProxy>

Please let me know if you need more specific help.

--
Thomas

brucepa...@gmail.com

não lida,
12 de dez. de 2012, 14:11:4212/12/2012
para membrane...@googlegroups.com
So, we set a custom header like "Bruce" to be "Some Data" in the initial client request to a SOAP call.  "Bruce" never gets to the SOAP service.

Thomas Bayer

não lida,
13 de dez. de 2012, 04:28:3713/12/2012
para membrane...@googlegroups.com
Hi,
what kind of custom header do you mean? An HTTP, an SOAP Header, or a
request property? It would be helpful if you provide the Membrane log as
described in my last POST or the code showing how you set this header.

Thanks,
Thomas

Gabriel Corrêa de Oliveira

não lida,
29 de mai. de 2015, 18:57:0029/05/2015
para membrane...@googlegroups.com, brucepa...@gmail.com
Bruce,

Have you checked whether your headers are not passed on all in lowercase?
I am experiencing a similar problem.

I see X-Forwarded-*** headers from the original request passed on as "x-forwarded-***".

Thomas Bayer

não lida,
1 de jun. de 2015, 06:06:2701/06/2015
para membrane...@googlegroups.com, gabri...@gmail.com, brucepa...@gmail.com
Gabriel,
the field names of HTTP headers are case insensitive (See: http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 ). But Membrane should not touch the names of fields. The x-forwarded-* headers are special cause Membrane is itself a proxy and sets this header or makes an addition to this field.

Cheers,
Thomas
Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem