Score:1

Why haproxy can not set custom header for ingress-nginx

hk flag

I have config haproxy.cfg like bellow

...
frontend app
        bind *:443
        mode tcp
        option  tcplog
        option forwardfor
        http-request set-header X-AONE-IP 10.0.0.1
        http-request set-header myheader 123

        use_backend be

backend be
        mode tcp
        http-request set-header X-AONE-IP 10.0.0.1
        http-request set-header myheader 123
        option forwardfor

        balance roundrobin
        server backend 127.0.0.1:9000 check
...

but on backend, I can not receive header X-AONE-IP neither myheader, when I using postman and set those header on postman to make request to haproxy or 127.0.0.1:9000, my backend app can receive that header

Score:2
ng flag

You use mode tcp, so all http commands don't work. Switch mode to http.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.