HAProxy on node.js - Invalid Host Header Error

I have configured haproxy after which I am able to launch my node application using the IP address.

However, if I use my domain instead on the URL, I get “Invalid Host Header” error.

Can someone assist, please?

Can someone please assist?

You need to check your backend an understand what it requires. Setting the host header in haproxy is very easy, but first you need to know what your backend requires.

http-request set-header Host whateverhostname.tld