Skip to content

Commit

Permalink
chore(infea): add missing callback invocation for lambda@edge function
Browse files Browse the repository at this point in the history
This function conditionally rewrites non-gz URLs to gz. The zip files are conditionally excluded. However, in case o zip file the "done" callback was not called at the end of the function, so the response was incorrect.

Here I add the callback invocation at the end of the function, so that requests for zip files are correctly replied to.
  • Loading branch information
ivan-aksamentov committed Mar 7, 2022
1 parent fddfb5a commit 295c3fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions infra/rewriteToGzip.lambda.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ exports.handler = (event, context, callback) => {
request.uri += '.gz'
callback(null, request)
}

callback(null, request)
}

0 comments on commit 295c3fa

Please sign in to comment.