Skip to content
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

App unable to render in Spin due to missing CSP #1715

Closed
AxelTheGerman opened this issue Aug 21, 2023 · 1 comment
Closed

App unable to render in Spin due to missing CSP #1715

AxelTheGerman opened this issue Aug 21, 2023 · 1 comment

Comments

@AxelTheGerman
Copy link

Issue summary

Shopify Admin refuses to render my app because of a missing frame-ancestor CSP (similar to #1321) - is there any way to customize the CSP setting?

  • shopify_api version: not sure
  • shopify_app version: 21.4.1 as well as 21.6.0
  • Ruby version: 3.2.2
  • Operating system: x86_64-linux
// Paste any relevant logs here

Expected behavior

The app should render as it does here when hard coding the host name for the frame-ancestor CSP:

Actual behavior

The app doesn't render due to misconfigured CSP:

and

@AxelTheGerman
Copy link
Author

Solved this by adding into the controller that serves the embedded app:

  content_security_policy do |policy|
    policy.frame_ancestors "development.host" if Rails.env.development?
  end

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

No branches or pull requests

1 participant