Angular official has no recommendation over the approach and support towards Content Security Policy. Has anyone has solution towards a strict CSP site with angular?
You can use Meta class shipped with angular to add a Meta tag.
import { Meta } from '@angular/platform-browser';
....
constructor(private meta: Meta)
...
meta.addTag({http-equiv: 'Content-Security-Policy', content: `default-src 'self'; base-uri 'self'; ${moreFromVariable} `});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.