Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/flash/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 重定向响应位置_Node.js_Amazon Web Services_Express_Redirect_Loopback - Fatal编程技术网

Node.js 重定向响应位置

Node.js 重定向响应位置,node.js,amazon-web-services,express,redirect,loopback,Node.js,Amazon Web Services,Express,Redirect,Loopback,我想将响应重定向到CURL链接,但收到错误消息 “发送到客户端后无法设置标头” 我使用环回响应 import { Response as loopResponse } from '@loopback/rest'; 这是我的密码 @inject(RestBindings.Http.RESPONSE) private loopResponse: loopResponse, async dashboardGenerate( @param.query.string('workgroupId'

我想将响应重定向到CURL链接,但收到错误消息

“发送到客户端后无法设置标头”

我使用环回响应

import { Response as loopResponse } from '@loopback/rest';
这是我的密码

 @inject(RestBindings.Http.RESPONSE) private loopResponse: loopResponse,
async dashboardGenerate(
    @param.query.string('workgroupId') workgroupId: string,
    @param.query.string('period') period: string,
    @param.query.string('historyDepth') historyDepth: number,
    @param.query.string('reportDate') reportDate: string,
  )  {
    const resp = await report.dashboardExport(
            reportDate,
          );
          const respBody = resp.body;
          this.logger.info('response: ', respBody);
          const params = {
            Bucket: fileBucket,
            Key: respBody.data.path.slice(1, -1),
            Expires: 400,
          };
          const curl = s3.getSignedUrl(Constants.SIGNED_URL_OPERATIONS.get, params);
          this.logger.info('curl: ', curl);
          return this.loopResponse.redirect(curl);
}