Skip to content

feat(core): use regex for image loader conditional #2292

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

Closed
wants to merge 1 commit into from

Conversation

jorgemoya
Copy link
Contributor

What/Why?

Changes image loader conditional to a regex that allows subdomains. This is needed to run Catalyst in a local environment that returns image urls with differing subdomains.

Testing

In a local environment, I can set a domain in my env variables and allow different subdomains (for example, cdn.store.dev and cluster.store.dev).

Migration

Update the image loader logic to use the new regex.

@jorgemoya jorgemoya requested a review from a team as a code owner May 6, 2025 20:38
Copy link

changeset-bot bot commented May 6, 2025

🦋 Changeset detected

Latest commit: 7e03d15

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bigcommerce/catalyst-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented May 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
catalyst-canary ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2025 8:38pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
catalyst ⬜️ Ignored (Inspect) May 6, 2025 8:38pm
catalyst-au ⬜️ Ignored (Inspect) May 6, 2025 8:38pm
catalyst-soul ⬜️ Ignored (Inspect) May 6, 2025 8:38pm
catalyst-uk ⬜️ Ignored (Inspect) May 6, 2025 8:38pm

matthewvolk
matthewvolk previously approved these changes May 7, 2025
@matthewvolk matthewvolk dismissed their stale review May 7, 2025 16:09

Chatted in standup, this might allow users to use subdomains maliciously

@jorgemoya
Copy link
Contributor Author

Closing for another solution

@jorgemoya jorgemoya closed this May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants