image-resizer icon indicating copy to clipboard operation
image-resizer copied to clipboard

Does not work with proxy

Open LMS007 opened this issue 7 years ago • 0 comments

Please allow some pass through S3 configuration options so this can work with a proxy. Its necessary to have these options exposed in the s3.js file otherwise this won't work with a proxy server.

sslEnabled httpOptions.proxy httpOptions.timeout

Such as...

try {
  // create an AWS S3 client with the config data
  client = new s3({
    accessKeyId: env.AWS_ACCESS_KEY_ID,
    secretAccessKey: env.AWS_SECRET_ACCESS_KEY,
    region: env.AWS_REGION,
    sslEnabled: env.S3_SSL_ENABLED,       /* new env option */
    httpOptions: {
      proxy: env.S3_PROXY,                /* new env option */
      timeout : env.S3_TIMEOUT,           /* new env option */
    },
  });
  bucket = env.S3_BUCKET;
} catch(e) {

}

LMS007 avatar Sep 06 '17 18:09 LMS007