markupguy
Hey Everyone,
Having a whale of a time with getting my Shopify Phoenix app’s CSS to render.
Auth is sorted and the HTML renders fine, however, the entire document head is stripped out (and therefore the CSS with it).
I’ve added Content-Security-Policy frame-ancestors to allow https://.shopify.com https://.myshopify.com.
Shout out to @ericdude4 for making the setup pretty smooth with Shopifex
but now, the dang CSS!
Does anyone have an idea off the top of your head what could be going wrong?
Trending in Questions
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
Hello,
I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind.
However, when I launch mix phx.server, I get an error...
New
I really like the adapter patterns that ecto, nebulex, waffle, etc. use and would love find something similar for a key management servic...
New
Hello folks!
So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
I’m working on a small exercise involving update_in/3, and I came up with this solution:
data = %{
name: "Periodic Table",
category:...
New
How Can I Optimise Compile Time Dependencies
I have been building an elixir application for about 2 years now. Many modules and files ha...
New
Is there any way to avoid the Hologram compiler running when using iex? It seems like the front-end code could potentially be disregarded...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #ai
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #metaprogramming













Showing Posts 1 to 9- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
ericdude4
Hey @markupguy! This looks really strange… I don’t think it will have anything to do with the CSP headers. Can you include a link to a git repo which reproduces the error? Maybe just whatever code you have here, with your app’s API secret key removed?
PS. Love to see Shopifex getting used! I am hoping to spend some time refactoring the library in the new year and improving the documentation.
zachallaun
Also happily using Shopifex in an internal app for our store.
I’ve been using Shopify’s Polaris library for styling along with Phoenix components. Been working out pretty well! I’ll look into how I have CSS stuff set up later.
markupguy
Thanks for the reply @zachallaun and @ericdude4 appreciate it! It really is quite strange.
But good to know this isn’t somehow expected, hah.
@ericdude4 it’s a super vanilla Phoenix app (just wanted to get it working first), with the Shopifex added bits. I’ve redone it a few times thinking I made a mistake somewhere. I can add you to the repo if you like, as it’s a private repo (doing a thing for a friend). Any and all help is welcome
PS: Merry Christmas!
markupguy
In a more confusing turn of events, when I force an error – the error page styles show just fine!
I notice these styles are embedded in the document head… but the head is not stripped out like mine is when the app doesn’t error. Weirdness.
ericdude4
Happy to take a look if you’d like to invite me to your repo?
Merry Christmas to you as well!
markupguy
thanks @ericdude4 I’ve added you! I owe you one which I’ll figure out how to say thanks
markupguy
Everyone here, I just want to say @ericdude4 is an absolute legend, going way beyond what can sensibly be expected from anyone i.t.o helping a stranger.
His solution:
it turns out that new phoenix specifies the root layout in
plug :put_root_layout, {MyappWeb.LayoutView, :root}which is in the:browserpipeline by default. Shopifex provides the:shopifex_browserpipeline which replicates the default:browserpipeline plus theplug(Shopifex.Plug.LoadInIframe)plug. This doesn’t include the newer:put_root_layoutplug though, which is why your app wasn’t loading anything fromlib/myapp_web/templates/layout/root.html.heex(loadiniframe plug was my addition to remove x-frame-options which Eric has built in already)
sergio
Kudos for sharing the solution.
ericdude4
Happy to help! We will need an update to the Shopifex readme to recommend folks simply add the
Shopifex.Plug.LoadInIframeto their existing browser pipeline instead of using:shopifex_browser