Hi,
is there a way to set SNI hostname when using URLSession (in a URLProtocl) before the SSL-Handshake?
To give you a bit more details:
There is an apache-server, which is only reachable via IP, but it has several vhosts.
The server is installed locally and used for developing and testing.
So, all Request will be done via IP-based URL but in the Request the "Host"-headerfield will be set with the hostname.
THis works with all non-secure http-Request.
But when I connect to an https-vhost (TLS)
The Server will return 400 - Bad Request and the error log on the server says
"Hostname [IP-Address] provided via SNI and hostname [HOSTNAME] provided by HTTP are different."
So my qustion:
Is there a way to add another or alter the Hostname in the SSLHandshake?
Thank you very much in advance.