mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-06 02:11:42 +02:00
Optimized CSP check
This commit is contained in:
@@ -3,12 +3,14 @@
|
||||
var allowedOrigin = "https://{{ domains | get_domain('web-app-port-ui') }}";
|
||||
|
||||
function notifyParent() {
|
||||
try {
|
||||
window.parent.postMessage({
|
||||
type: "iframeLocationChange",
|
||||
href: window.location.href
|
||||
}, allowedOrigin);
|
||||
} catch (e) {}
|
||||
if (window.self !== window.top) {
|
||||
try {
|
||||
window.parent.postMessage({
|
||||
type: "iframeLocationChange",
|
||||
href: window.location.href
|
||||
}, allowedOrigin);
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
|
||||
function forceExternalLinks() {
|
||||
|
Reference in New Issue
Block a user