Skip to content
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

Merged
merged 1 commit into from Feb 3, 2016
Merged

Conversation

dvoytenko
Copy link
Contributor

No description provided.


// Viewer override.
if (this.params_['referrer']) {
return this.params_['referrer'];
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. PTAL.

@dvoytenko
Copy link
Contributor Author

@cramforce PTAL

@@ -57,6 +58,7 @@ describe('dynamic classes are inserted at runtime', () => {
}
if (referrer !== undefined) {
overwrite(fixture.doc, 'referrer', referrer);
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. Removed.

@dvoytenko
Copy link
Contributor Author

@cramforce PTAL.

@cramforce
Copy link
Member

LGTM

@dvoytenko
Copy link
Contributor Author

I will merge the new cases with taboola here as well.

@dvoytenko dvoytenko force-pushed the viewer-ref branch 3 times, most recently from 7cb1db8 to 8747f1c Compare February 3, 2016 01:49
dvoytenko added a commit that referenced this pull request Feb 3, 2016
Pass referrer from the viewer
@dvoytenko dvoytenko merged commit 8d18778 into ampproject:master Feb 3, 2016
@dvoytenko dvoytenko deleted the viewer-ref branch February 3, 2016 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants