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 5 years ago
Relevant content
asked 3 years ago
asked 2 years ago
asked 3 years ago
- AWS OFFICIALUpdated a year ago
