Fix: Lost schema of S3 URL. by fukumoto-ts · Pull Request #1893 · hackmdio/codimd
fukumoto-ts
changed the title
fix: default scheme settings to https
Fix: Lost schema of S3 URL.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue where the S3 URL lost its HTTPS scheme when a region was specified other than "us-east-1".
- Ensures that the S3 endpoint always includes the "https://" scheme.
- Targets the URL construction in the S3 image upload function.
Comments suppressed due to low confidence (1)
lib/imageRouter/s3.js:54
- The updated endpoint now correctly includes the HTTPS scheme for non-'us-east-1' regions, which fixes the lost schema error. Please verify that similar URL constructions in related modules consistently implement the HTTPS protocol.
s3Endpoint = `https://s3-${config.s3.region}.amazonaws.com`
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters