reg-suit icon indicating copy to clipboard operation
reg-suit copied to clipboard

reg-publish-s3-plugin could not get correct report url when using s3 compatible storage

Open johejo opened this issue 5 years ago • 0 comments

Describe the bug

When using customDomain and, endpoint (in sdkOptions) at the same time on s3 compatible storage e.g. minio, the report url built incorrectly. Protocol is already included in endpoint. https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#constructor_details https://github.com/reg-viz/reg-suit/blob/8e23456025c7e9c49a227493df91ee9f959e857d/packages/reg-publish-s3-plugin/src/s3-publisher-plugin.ts#L43

Sorry if s3 compatible storage is not supported.

Reproduced step

  1. Run minio locally. https://docs.min.io/docs/minio-quickstart-guide.html
  2. set regconfig.json like this
    "reg-publish-s3-plugin": {
      "bucketName": "regviz",
      "customDomain": "http://127.0.0.1:9000",
      "sdkOptions": {
        "endpoint": "http://127.0.0.1:9000",
        "accessKeyId": "xxx",
        "sslEnabled": false,
        "secretAccessKey": "yyy",
        "s3ForcePathStyle": true,
        "signatureVersion": "v4"
      }

  1. Run reg-suit run

Expected behavior

[reg-suit] info Report URL: http://127.0.0.1:9000/xxxx/index.html

Actual behavior

[reg-suit] info Report URL: https://http://127.0.0.1:9000/xxxx/index.html

Screenshots

johejo avatar Oct 24 '19 16:10 johejo