CSP 차단 출처 분류 보강

This commit is contained in:
2026-07-29 17:34:43 +09:00
parent 9113711a8a
commit 93eb5dd96d
9 changed files with 28 additions and 10 deletions

View File

@@ -71,14 +71,14 @@ export const normalizeCspBlockedOrigin = (value) => {
const normalized = String(value || '').trim().toLowerCase()
if (!normalized) {
return 'unknown'
return 'empty'
}
if (['inline', 'eval', 'self'].includes(normalized)) {
return normalized
}
if (/^(data|blob|filesystem):/.test(normalized)) {
if (/^(about|data|blob|filesystem|chrome-extension|moz-extension|safari-web-extension|ms-browser-extension):/.test(normalized)) {
return `${normalized.split(':', 1)[0]}:`
}