You can simply check for an assign before rendering the header in your app.html.eex. Like
<%= if assigns[:render_header] do %>
<%= render MagnifyWeb.PublicSharedView, "_header.html", assigns %>
<% end %>
Then in the controller function for those routes, you can set :render_header in the assign
Like
conn|>render(template file, render_header: true)
You can have a different layout template (e.g app_no_header.html.eex) for those routes that you don’t want the header to to show. In that template file remove the