-
Notifications
You must be signed in to change notification settings - Fork 73
Add support for / use TrustedTypes (CSP) #850
Copy link
Copy link
Open
Labels
next major: breaking changethis is a change that we should wait to bundle into the next major versionthis is a change that we should wait to bundle into the next major versiontype: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Metadata
Metadata
Assignees
Labels
next major: breaking changethis is a change that we should wait to bundle into the next major versionthis is a change that we should wait to bundle into the next major versiontype: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Describe the solution you'd like
The @googlemaps/js-api-loader should support CSP TrustedTypes
Describe alternatives you've considered
Disabling CSP
Additional context
When CSP is enabled on the server, there will be a runtime error
In the library index.mjs file, line #369
a.src = this.url +
?+ e; this assignment is the main problemTt should have been something like script.src = getPolicy()?.createScriptURL(url) ?? url; instead
and the library should register its TrustedType policy out of the box