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
✨ amp-next-page: Rewrite URLs to fetch from the cache when serving from the cache #14633
✨ amp-next-page: Rewrite URLs to fetch from the cache when serving from the cache #14633
Conversation
peterjosling
commented
Apr 16, 2018
- Allows for publishers to serve the same set of URLs for both canonical/cache
- Avoids making cross-origin requests from the cache, and ensures that the requested document is valid
6d79525
to
3fe3abd
Compare
|
||
if (isProxyOrigin(url)) { | ||
const sourceOrigin = getSourceOrigin(url); | ||
configJson.pages.forEach(rec => { |
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.
should become configJson['pages']
and handle the edge case where it may be null or not be an array. @peterjosling
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.
Oops, should've been this.config_.pages.
null/isArray checks already done in assertConfig
.
3fe3abd
to
76393fd
Compare
- Allows for publishers to serve the same set of URLs for both canonical/cache - Avoids making cross-origin requests from the cache, and ensures that the requested document is valid
76393fd
to
b851504
Compare