Skip to content

Content.ad: CDN domain processing#7316

Merged
jridgewell merged 3 commits intoampproject:masterfrom
Content-ad-net:patch-5
Feb 11, 2017
Merged

Content.ad: CDN domain processing#7316
jridgewell merged 3 commits intoampproject:masterfrom
Content-ad-net:patch-5

Conversation

@jlucero-contentad
Copy link
Copy Markdown
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
Copy Markdown
Contributor

to @lannka

@jlucero-contentad
Copy link
Copy Markdown
Contributor Author

Ping @lannka

ads/contentad.js Outdated
let sourceUrl = window.context.sourceUrl;
if (data.url) {
const host = window.context.location.host;
const s = document.createElement('a');
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

Ping @lannka or @zhouyx

@jridgewell jridgewell requested a review from zhouyx February 8, 2017 22:13
@jlucero-contentad
Copy link
Copy Markdown
Contributor Author

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

@jridgewell
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

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

@lannka

@zhouyx
Copy link
Copy Markdown
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.

4 participants