HTTPS hostname wrong: should be . What causes this?

后端 未结 7 644
故里飘歌
故里飘歌 2020-12-03 10:38

I am getting this \'HTTPS hostname wrong:\' error when trying to connect to a server using https. My url looks something like this

https://sub.domain.com/tam         


        
相关标签:
7条回答
  • 2020-12-03 11:18

    This is just an alternative of 'svarog' post

    static {
    
        HttpsURLConnection.setDefaultHostnameVerifier((hostname, session) -> hostname.equals("domain name"));
    }
    
    0 讨论(0)
提交回复
热议问题