Did anyone try if access to CDN hosted libraries is allowed with LockerService activated and Winter '17? It would be great if we could use Google Maps within Lightning Components.


Does Locker allow me to access libraries hosted on a CDN (i.e. Google Maps)? It makes it possible for us to open up our Content Security Policy to allow this in Winter 2017 (safe harbor).

  • 1
    In the meantime, you might try embedding iframe of visualforce page in your component's markup that loads CDN hosted libraries then communicate between visualforce and your lightning component via window.postMessage. This technique is demoed here: youtube.com/watch?v=UpXxelyb5D4
    – Doug Ayers
    Dec 3, 2016 at 5:15

1 Answer 1


The Lightning Content Security Policy in place (long before LS) does not allow script-src currently. There has been a long series of discussions on this between engineering and product security to try and reach an accord on opening this up. LS is a step toward this but our security team wants additional, non LS related features around packaging and package installation before they will consider opening this up. I am still working very hard to get this critical bit of functionality through the sausage factory - the bar has been raised a few times though (for good reasons IMO) - and getting this done involves more areas/teams.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .