|
@@ -24,7 +24,10 @@ const globalConfiguration = {
|
|
|
|
|
|
async function build_request(request) {
|
|
async function build_request(request) {
|
|
let dstUrl = new URL(request.url);
|
|
let dstUrl = new URL(request.url);
|
|
-
|
|
|
|
|
|
+ //预签名URL支持
|
|
|
|
+ if (request.headers.has('signed-url')) {
|
|
|
|
+ return new Request(request.headers.get('signed-url'));
|
|
|
|
+ }
|
|
dstUrl.host = request.headers.has('x-host') ? request.headers.get('x-host') : globalConfiguration.aws_base_url;
|
|
dstUrl.host = request.headers.has('x-host') ? request.headers.get('x-host') : globalConfiguration.aws_base_url;
|
|
dstUrl.search = '';
|
|
dstUrl.search = '';
|
|
// dstUrl.pathname = url.pathname.substring('/imgprocessingtest'.length)
|
|
// dstUrl.pathname = url.pathname.substring('/imgprocessingtest'.length)
|