Skip to content

Commit

Permalink
fix(firefox-prefetch): IMA should not re-render prefetched URLs that …
Browse files Browse the repository at this point in the history
…are included in rel="next" links
  • Loading branch information
Yury Tomilin committed Mar 5, 2019
1 parent 639298c commit bae6aaf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/skeleton/server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ process.on('unhandledRejection', error => {
});

function renderApp(req, res, next) {
if (
req.headers['x-moz'] &&
req.headers['x-moz'] === 'prefetch'
) {
res.status(204);
res.send();

return;
}

if (req.method === 'GET') {
let cachedPage = cache.get(req);
if (cachedPage) {
Expand Down

0 comments on commit bae6aaf

Please sign in to comment.