Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: 额外参数v2插件携带自定义header参数偶发丢失 #137

Open
luoyger opened this issue Nov 20, 2023 · 0 comments
Open

bug: 额外参数v2插件携带自定义header参数偶发丢失 #137

luoyger opened this issue Nov 20, 2023 · 0 comments
Assignees

Comments

@luoyger
Copy link

luoyger commented Nov 20, 2023

Current Behavior

配置了额外参数v2插件,配置信息如下,在上游服务中获取headers,偶发获取不到自定义的header字段

{
    "error_type": "text",
    "params": [{
        "name": "application",
        "position": "header",
        "type": "$concat",
        "value": ["$application"]
    }, {
        "name": "remote_addr",
        "position": "header",
        "type": "$concat",
        "value": ["$remote_addr"]
    }, {
        "name": "uri",
        "position": "header",
        "type": "$concat",
        "value": ["$uri"]
    }],
    "request_body_type": "json"
}

Expected Behavior

No response

Error Logs

在access-log中打印系统变量,有正常输出系统变量值

{
    "fields":[
        "$time_iso8601",
        "$request_id",
        "@request",
        "@proxy",
        "@response",
        "@status_code",
        "@time"
    ],
    "request":[
        "$request_method",
        "$scheme",
        "$request_uri",
        "$host",
        "$header",
        "$remote_addr",
        "$application",
        "$token"
    ],
    "proxy":[
        "$proxy_method",
        "$proxy_scheme",
        "$proxy_uri",
        "$proxy_host",
        "$proxy_header",
        "$proxy_addr"
    ],
    "response":[
        "$response_header"
    ],
    "status_code":[
        "$status",
        "$proxy_status"
    ],
    "time":[
        "$request_time",
        "$response_time"
    ]
}

Steps to Reproduce

重复请求,偶发上游服务接收不到自定义header参数。

Environment

apinto版本信息,有自行修改commit,主要关注tag: v0.14.4

Apinto version: 2023101615-786f44a
Golang version: go version go1.20.3 linux/amd64
Git commit hash: 786f44a6468f89112163d04ad12f11c85400d2e8
Built on: 2023-10-16T07:23:03Z
Built by: gitlab
Built by eosc version: v0.14.4
@Dot-Liu Dot-Liu self-assigned this Nov 21, 2023
@Dot-Liu Dot-Liu added this to Apinto Nov 21, 2023
@Dot-Liu Dot-Liu moved this to In Progress in Apinto Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

2 participants