New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass referrer from the viewer #1717
Conversation
|
||
// Viewer override. | ||
if (this.params_['referrer']) { | ||
return this.params_['referrer']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should only trust this for trusted viewers. That is a concept we need to introduce.
Basically if the referrer/ancestorOrigins is google.com, we'd do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. PTAL.
@cramforce PTAL |
@@ -57,6 +58,7 @@ describe('dynamic classes are inserted at runtime', () => { | |||
} | |||
if (referrer !== undefined) { | |||
overwrite(fixture.doc, 'referrer', referrer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line can be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. Removed.
@cramforce PTAL. |
LGTM |
I will merge the new cases with taboola here as well. |
7cb1db8
to
8747f1c
Compare
Pass referrer from the viewer
No description provided.