Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Fix theme serve on Safari #1909

Merged
merged 5 commits into from
Jan 13, 2022
Merged

Fix theme serve on Safari #1909

merged 5 commits into from
Jan 13, 2022

Conversation

karreiro
Copy link
Contributor

@karreiro karreiro commented Jan 11, 2022

WHY are these changes introduced?

Theme preview doesn't correctly load when users run shopify theme serve and open http://127.0.0.1:9292.

WHAT is this pull request doing?

This PR deactivates the content-security-policy layer locally in the development web server, so Safari requests are no longer redirected to HTTPS, and SSL errors don't happen anymore.

How to test your changes?

Run shopify theme serve and open http://127.0.0.1:9292 on Safari.

Before this PR:
before

After this PR:
after

I missed to show the logs in the Gif, so click here to see it :) Screenshot 2022-01-11 at 19 14 16

Post-release steps

None.

Update checklist

  • I've added a CHANGELOG entry for this PR (if the change is public-facing)
  • I've considered possible cross-platform impacts (Mac, Linux, Windows).
  • I've left the version number as is (we'll handle incrementing this when releasing).
  • I've included any post-release steps in the section above.

@karreiro karreiro requested review from macournoyer, a team, hannachen and gonzaloriestra and removed request for a team January 11, 2022 18:31
@karreiro karreiro linked an issue Jan 11, 2022 that may be closed by this pull request
Copy link
Contributor

@macournoyer macournoyer left a comment

Choose a reason for hiding this comment

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

DAMN! You did it again 🔥 Way simpler than I thought 😂

Just a nitpick about using a new middleware, up to you if you feel strongly about it.

lib/shopify_cli/theme/dev_server/dev_headers.rb Outdated Show resolved Hide resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shopify Theme Serve doesn't work under Safari
2 participants