有个问题请教一下,我http的接口想要从header中拿到Authorization的值,但是发现接口转换为mcp后mcp中的header没有传给http的header,协议转换配置里应该怎么写才能把mcp的header映射到http的header上呢 || I have a question. My http interface wants to get the Authorization value from the header, but I found that after the interface was converted to mcp, the header in mcp was not passed to the header of http. What should I write in the protocol conversion configuration to map the header of mcp to the header of http? #3385
Replies: 1 comment
-
|
是不是nacos不支持配置透传啊 Does nacos not support configuration transparent transmission? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
我的协议转换配置是这么写的,但是http请求拿不到mcp里Authorization的值,我在文档上只看到把args中的值往http接口参数或header里映射,怎么把mcp的header映射到http接口的header上呢
{
"requestTemplate": {
"url": "/v1.0/mcp/platform/search",
"argsToUrlParam": true,
"method": "GET",
"headers": [{
"key": "Authorization",
"value": "{{ .args.Authorization }}"
}]
}
}
My protocol conversion configuration is written like this, but the HTTP request cannot get the Authorization value in mcp. I only saw in the document that the value in args is mapped to the http interface parameters or header. How to map the header of mcp to the header of the http interface?
{
"requestTemplate": {
"url": "/v1.0/mcp/platform/search",
"argsToUrlParam": true,
"method": "GET",
"headers": [{
"key": "Authorization",
"value": "{{ .args.Authorization }}"
}]
}
}
Beta Was this translation helpful? Give feedback.
All reactions