Created
February 22, 2021 17:21
-
-
Save lydemann/71b2c7362ff979840828295e4641704f to your computer and use it in GitHub Desktop.
course-content.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private getTrustedVideoUrl(url: string): SafeResourceUrl { | |
// Url domains are whitelisted using CSP header | |
// Content-Security-Policy: frame-src <source> <source>; | |
const sanitizedUrl = this.sanitizer.sanitize( | |
SecurityContext.RESOURCE_URL, | |
url | |
); | |
return this.sanitizer.bypassSecurityTrustResourceUrl(sanitizedUrl); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment