2

I know from this question that I can whitelist domains where I know it will be making non HTTPS requests.

However, after whitelisting a few domains, I noticed that there are still a few requests blocked by NSURLRequest, is there a way to find out which domains are being blocked by it?

Community
  • 1
  • 1
Enrico Susatyo
  • 19,372
  • 18
  • 95
  • 156

2 Answers2

4

If you are making the request, modify your connection:didFailWithError: method and print the URL that failed.

If some third-party library is making the request, set the CFNETWORK_DIAGNOSTICS environment variable to 1 (or 2 or 3).

dgatwood
  • 10,129
  • 1
  • 28
  • 49
-3

http requests are not blocked, they are automatically turned into https requests. To find out what is blocked, set a breakpoint in your code where a connection error would be reported.

gnasher729
  • 51,477
  • 5
  • 75
  • 98
  • Technically true, but if the server doesn't support HTTPS (or if HTTPS provides content for a different domain and doesn't support SNI), the difference is purely academic. – dgatwood Sep 16 '15 at 03:29
  • Thats a function of the server, not the client. – Shayne Oct 28 '16 at 04:39