Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47ad9f8 commit 020b0aeCopy full SHA for 020b0ae
web-app/src/services/listeners/index.ts
@@ -1,9 +1,8 @@
1
-import ReactDOM from 'react-dom'
2
import logger from '../logger'
3
4
-// document listeners
5
-
6
document.addEventListener('securitypolicyviolation', (event) => {
7
// TODO: add error handling
8
- logger(`Security warning for resource: ${JSON.stringify(event)}`)
+ if (event.isTrusted !== true) {
+ logger(`Security warning for resource: ${JSON.stringify(event)}`)
+ }
9
})
0 commit comments