i am connecting from website test.com and using fetch to make query to api.test.com. but for some weird reason req.ssl_sni -i https://test.com doesnt seem to be respected therefore the connection fails.
but when i check logs, i see this. ssl_fc_has_sni '1' sni:'-' ssl_fc_sni 'api.test.com' ssl_fc_protocol 'TLSv1.3'.
why is sni empty ? also why is ssl_fc_sni using the api.test.com not the test.com where the request is being made from ?
HAProxy version 2.4.22
frontend front
bind *:443 ssl crt /etc/ssl/ssl.pem
mode tcp
option tcplog
tcp-request inspect-delay 5s
tcp-request content capture req.ssl_sni len 25
tcp-request content accept if { req.ssl_hello_type 1 }
acl is_subdomain req.ssl_sni -i https://www.test.com
acl is_main_domain req.ssl_sni -i https://test.com
use_backend example_server if is_subdomain
use_backend example_server if is_main_domain
backend example_server
mode tcp
server server1 127.0.0.1:8084 check