1 Answer
- Newest
- Most votes
- Most comments
0
I solved this problem.
First, I had associated the function with the wrong distribution.
Second, to make a change to one directory in the path, I used the following function:
function handler(event) {
var request = event.request;
var uri = request.uri;
//Check whether the URI is bad.
if (uri.includes('xxx-xxx-gt')) {
var uriArray = request.uri.split('/');
//Change the bad dir to the '18' dir in the URI
uriArray[3] = 18;
request.uri = uriArray.join('/');
}
return request;
}
I hope this helps someone else.
answered 3 years ago
Relevant content
- asked 7 months ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a month ago