Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static removeMiddleware(middlewareName) {
if (!middlewareNames.includes(middlewareName)) {
Shopware.Utils.debug.warn(
'Sanitizer',
`No middleware found for name "${middlewareName}",
the following are available: ${middlewareNames.join(', ')}`
);
return false;
}
domPurify.removeHooks(middlewareName);
return true;
}
static removeMiddleware(middlewareName) {
if (!middlewareNames.includes(middlewareName)) {
Shopware.Utils.debug.warn(
'Sanitizer',
`No middleware found for name "${middlewareName}",
the following are available: ${middlewareNames.join(', ')}`
);
return false;
}
domPurify.removeHooks(middlewareName);
return true;
}