Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
johejo opened this issue Oct 24, 2019 · 0 comments
Labels

Comments

@johejo
Copy link

johejo commented Oct 24, 2019

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

const reportUrl = indexFile && `https://${this.getBucketDomain()}/${this.resolveInBucket(key)}/${indexFile.path}`;

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 johejo added the bug label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant