First of all, I have a HTTPS configured instance of ArcGIS Server running. Confirmed to be working by visiting the HTTPS endpoints in the browser without fail. My problem lies in the loading of a web map that I've built using ArcGIS Web AppBuilder and exported to disk. I've placed the exported web map on my IIS server which has SSL enabled as well. The web map loads fine through IIS and I reach the page with a secure SSL connection. However, after the page loads and after I log in to my AGOL account, the JS SDK attemps to retrieve my ArcGIS Server info at an HTTP endpoint http://my.server.name:6080/arcgis/rest/info?f=json instead of the HTTPS endpoint (which works by the way) https://my.server.name:6443/arcgis/rest/info?f=json.
Shouldn't the JS SDK be auto-sensing and use the correct endpoint? If I load the web map page using HTTP then everything works because I don't have any mixed content. Right now, I have no map layers retrieved from ArcGIS Server because my web maps loads on HTTPS and the browser blocks the HTTP request to ArcGIS Server for the server info (and subsequently, the map layers don't load).