gpt4 book ai didi

mule - 从出站 HTTP 调用中删除 MULE_SESSION header

转载 作者:行者123 更新时间:2023-12-04 18:07:56 26 4
gpt4 key购买 nike

我想从传出的 HTTP 请求中删除 mule 特定的 header 。我在 HTTP 调用中放置了以下转换器。

<message-properties-transformer
doc:name="Message Properties">
<add-message-property key="Authorization" value="ffffffffff" />
<add-message-property key="Content-Type" value="application/json" />
<add-message-property key="Accept" value="application/json" />
<delete-message-property key="MULE_ENCODING" />
<delete-message-property key="MULE_SESSION" />
<delete-message-property key="MULE_ENDPOINT" />
</message-properties-transformer>

但是,以下属性仍然作为 http header 输出——
{
MULE_SESSION=rO0ABXNyACNvcmcubXVsZS5zZXNzaW9uLkRlZmF1bHRNdWxlU2Vzc2lvbi7rdtEW7GGKAwAFWgAFdmFsaWRMAA1mbG93Q29uc3RydWN0dAAmTG9yZy9tdWxlL2FwaS9jb25zdHJ1Y3QvRmxvd0NvbnN0ceterteXZhL2xhbmcvU3RyaW5nO0wACnByb3BlcnRpZXN0AA9MamF2YS91dGlgdfgdfgdfg3JnL211bGUvYXBpL3NlY3VyaXR5L1NlY3VyaXR5Q29udGV4dDt4cAFwdAAkZDU3MWU5YmEtYTNlNC0xMWUzLWIxMjEtYmJlMWRiMDBjNTE1c3IAJWphdmEudXRpbC5Db2xsZWN0aW9ucyRTeW5jaHJvbml6ZWRNYXAbc/kJS0s5ewMAAkwAAW1xAH4AA0wABW11dGV4dAASTGphdmEvbGFuZy9PYmplY3Q7eHBzcgAkb3JnLm11bGUudXRpbC5DYXretertretreIYXNoTWFwndHZ72dFzgADAAB4cHcMP0AAAAAAABAAAAAAeHEAfgAJeHB4,
Authorization=sHHZVtlErfzhiT4V6ecK6B,
Host=localhost:8000,
Content-Length=55,
MULE_ENDPOINT=http://localhost:8000/test,
User-Agent=Jakarta Commons-HttpClient/3.1,
Keep-Alive=false,
Connection=false,
Content-Type=application/json,
Accept=application/json,
originatingip=20.20.20.20
}

最佳答案

您实际上必须为此配置 HTTP 连接器:

<http:connector name="NoSessionConnector">
<service-overrides sessionHandler="org.mule.session.NullSessionHandler"/>
</http:connector>

关于mule - 从出站 HTTP 调用中删除 MULE_SESSION header ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22183695/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com