generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
I would like to change the recover some values from cookies and add it into the request body, I also need to decode JWT token to make some validations.
Error: The CloudFront function returned an invalid value: the request object has an unexpected field.
`async function handler(event) {
var request = event.request
var cookies = request.cookies
var host = request.headers.host.value;
var decodeIdToken = jwt_decode(jwtToken, key);
// some validations based on decodedToken//
request.body={
data:{
access_token:cookies['access_token'],
refresh_token: cookies['refresh_token'],
client_id: cookies['client_id'],
grant_type: 'refresh_token',
}
}
return request;
}`
Metadata
Metadata
Assignees
Labels
No labels