1 個回答
- 最新
- 最多得票
- 最多評論
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.
已回答 3 年前
相關內容
- AWS 官方已更新 2 年前
- AWS 官方已更新 1 年前