Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Don't assume the host URI scheme is https #385

Merged
merged 5 commits into from
May 16, 2022
Merged

Conversation

pepicrft
Copy link
Contributor

WHY are these changes introduced?

We'll allow loading apps from localhost through http in the upcoming CLI release. To make it work, we need to adjust the logic in this package to not assume that the URI scheme is https.

WHAT is this pull request doing?

I'm removing the https assumption and allowing the consumer of the package to configure the URI scheme through the new context attribute, HOST_SCHEME. To make the change backward-compatible, I'm defaulting to https when no value is provided.

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)
  • Minor: New feature (non-breaking change which adds functionality)
  • Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have added a changelog entry, prefixed by the type of change noted above
  • I have added/updated tests for this change
  • I have documented new APIs/updated the documentation for modified APIs (for public APIs)

@pepicrft pepicrft requested a review from a team as a code owner May 16, 2022 10:20
@pepicrft pepicrft self-assigned this May 16, 2022
Copy link

@gonzaloriestra gonzaloriestra left a comment

Choose a reason for hiding this comment

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

👌

Copy link
Contributor

@paulomarg paulomarg left a comment

Choose a reason for hiding this comment

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

LGTM code-wise, just a comment around testing!

src/base-types.ts Show resolved Hide resolved
src/context.ts Show resolved Hide resolved
@pepicrft pepicrft merged commit da4a12e into main May 16, 2022
@pepicrft pepicrft deleted the context-host-scheme branch May 16, 2022 14:16
@shopify-shipit shopify-shipit bot temporarily deployed to production May 16, 2022 14:32 Inactive
@shopify-shipit shopify-shipit bot temporarily deployed to production July 4, 2022 16:01 Inactive
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants