checkSource method
Throws CspViolationError if the action is not allowed.
Implementation
void checkSource({
required String type,
required Uri uri,
required Uri? selfUri,
}) {
if (!isAllowedSource(type: type, uri: uri, selfUri: selfUri)) {
throw CspViolationError(
action: type,
uri: uri,
csp: this,
);
}
}