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

Content.ad: CDN domain processing #7316

Merged
merged 3 commits into from Feb 11, 2017
Merged

Conversation

jlucero-contentad
Copy link
Contributor

Resolve issue where CDN domain processing failed when the host did not match the requesting domain

Converted let variable to const since it is never changed.
@jridgewell
Copy link
Contributor

to @lannka

@jlucero-contentad
Copy link
Contributor Author

Ping @lannka

ads/contentad.js Outdated
@@ -35,9 +35,10 @@ export function contentad(global, data) {
/* Pass Source URL */
let sourceUrl = window.context.sourceUrl;
if (data.url) {
const host = window.context.location.host;
const s = document.createElement('a');
Copy link
Contributor

Choose a reason for hiding this comment

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

you can use parseUrl from url.js

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought I was using that - see lines 39 and 41 below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are you suggesting that I should use a different method @lannka?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, you should call parseUrl to replace the anchor element/s.href code here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jridgewell I think I got it. I updated the code to use parseUrl. Please let me know if anything further needs to be done to get this merge request approved.

@jridgewell
Copy link
Contributor

Ping @lannka or @zhouyx

@jlucero-contentad
Copy link
Contributor Author

@jridgewell any chance this pull request could go out with this week's release?

@jridgewell
Copy link
Contributor

We just cut canary last night, so not this week. Additionally, we have a 2 week release schedule, so yours will go into canary next Wed, and production the following Wed.

@jlucero-contentad
Copy link
Contributor Author

Oh ok. Previously release day was Thursdays. But next week will have to do. Thank you!
Is there any thing I can do to help get this merge approved for the next release?

@jridgewell
Copy link
Contributor

Is there any thing I can do to help get this merge approved for the next release?

@lannka

@zhouyx
Copy link
Contributor

zhouyx commented Feb 10, 2017

LGTM.
Ping @lannka for approval.

@jridgewell jridgewell merged commit efe1a9f into ampproject:master Feb 11, 2017
torch2424 pushed a commit to torch2424/amphtml that referenced this pull request Feb 14, 2017
* Content.ad: CDN domain processing

* Changed let to const

Converted let variable to const since it is never changed.

* Updated to use parseUrl method
mrjoro pushed a commit to mrjoro/amphtml that referenced this pull request Apr 28, 2017
* Content.ad: CDN domain processing

* Changed let to const

Converted let variable to const since it is never changed.

* Updated to use parseUrl method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants