I have a package that was submitted for security review which requires JS to be in static resources.

Required: all script and style resources must be loaded through static resources Do not load resources dynamically with a link or script tag. Do not hotlink to JavaScript code outside of static resources.

From https://partners.salesforce.com/s/education/appinnovators/AppExchange_Security_Requirements_Checklist

However there is a page which uses google maps api and so there is a reference to their javascript

<script src="https://maps.googleapis.com/maps/api/js?sensor=false&callback=renderMap&key=keygoeshere" >

As part of this the api key is passed in the url, how can this be done with the JS in a static resource. And is there not an issue with putting it in a static resource anyway in case google updates the JS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.