matomo icon indicating copy to clipboard operation
matomo copied to clipboard

[js]Update * to originHost

Open peterhashair opened this issue 2 years ago • 4 comments

Description:

Fixes: #19358 Only fix apply issue 1 fixes. update * to originHost. It seems e.origin contain protocol already.

Review

peterhashair avatar Jul 06 '22 03:07 peterhashair

build js

peterhashair avatar Jul 17 '22 23:07 peterhashair

The code changes are looking ok. @peterhashair what exactly did you do to test the changes locally? I did not yet have a look for what exactly the changed code is used, would be helpful if you could provide some insights, so I don't need to spent too much time to find some code that allows testing it.

sgiehl avatar Jul 18 '22 08:07 sgiehl

ping @peterhashair this is waiting for your reply to @sgiehl to help him review this effectively.

justinvelluppillai avatar Aug 09 '22 21:08 justinvelluppillai

@sgiehl @justinvelluppillai ops, sorry, I think there is js test for it, which is that one. https://github.com/matomo-org/matomo/blob/a8dec66081fa5cd671a668ef248c36e9d3285ffc/tests/javascript/index.php#L5219

But to tests locally. I add this to my

     addEventListener('load', (event) => {
                const targetFrame = window.top.frames[0];
                const targetOrigin = 'https://yourtrackingsite';
                targetFrame.postMessage('{"d":"hello there","maq_initial_value":true}', targetOrigin);
            });

peterhashair avatar Aug 10 '22 01:08 peterhashair

@peterhashair the PR contains two added files, that shouldn't exist.

sgiehl avatar Aug 12 '22 11:08 sgiehl

@sgiehl ops, that was accidentally added, removed.

peterhashair avatar Aug 14 '22 22:08 peterhashair