Search code examples
sharepoint-onlinespfx

Access intranet URL on SharePoint Online?


In my company we have some internal URLs what we would like to link to in the cloud.

I've created an SPFx web part and try to display an HTML img tag with the URL of http://intranetserver/MyPics/user123/headshot.jpg

but I get

Failed to load resource: net::ERR_SSL_PROTOCOL_ERROR

Is there something I need to do within my web part solution or Azure to allow this access?


Solution

  • You're running into an SSL issue because you're trying to load content from a non-secure URL (http instead of https), not to mention it's from another domain, so cross-domain concerns play into it as well.

    The two best choices are:

    • Upload the image(s) directly to your SPO site, in the default images document library

      • (or another, more private document library if necessary)
    • Create an SSL certificate and place it on the internal server that's hosting the images