Fix: Lost schema of S3 URL. by fukumoto-ts · Pull Request #1893 · hackmdio/codimd

@fukumoto-ts

@fukumoto-ts

Signed-off-by: Takeru Fukumoto <fukumoto_takeru@beenos.com>

@fukumoto-ts fukumoto-ts changed the title fix: default scheme settings to https Fix: Lost schema of S3 URL.

Feb 20, 2025

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`

jackycute

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.