Skip to content

Commit

Permalink
DO-1484: reorganise the sequence to fix the bug not stripping script …
Browse files Browse the repository at this point in the history
…tags properly
  • Loading branch information
Chris Park committed Oct 5, 2023
1 parent ddbcd17 commit 0b880f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/prerender-fargate/lib/prerender/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ if (process.env.ENABLE_REDIRECT_CACHE.toLowerCase() === 'true'){

next();
});
},

}});
server.use(prerender.removeScriptTags());
server.use({
pageLoaded: function(req, res, next) {
const statusCodesToCache = ['200', '301', '302'];
var s3Metadata = {}
Expand Down Expand Up @@ -127,7 +128,6 @@ if (process.env.ENABLE_REDIRECT_CACHE.toLowerCase() === 'true'){
});
}
});
server.use(prerender.removeScriptTags());
} else {
server.use(prerender.httpHeaders());
server.use(prerender.removeScriptTags());
Expand Down

0 comments on commit 0b880f3

Please sign in to comment.