Deploy Elixir app with Gigalixir but my api got (blocked:mixed-content)

Deploying to my gigalixir application I got ssl issues (blocked:mixed-content)

pipeline :api do
  plug(:accepts, ["json"])

  if Application.get_env(:my_app, :force_ssl) do
    plug(Plug.SSL, rewrite_on: [:x_forwarded_proto], host: nil)
  end
end

pipeline :auth do
  plug MyAppWeb.Plug.AuthCheck
end
scope "/api", MyAppWeb do
  pipe_through :api
  pipe_through :auth
  post "/messages", MessageController, :query_messages
end

Review through your application whether you do not include some external resources (images, JS scripts, CSS, etc.) using http instead of https. It has nothing to do with TLS configuration in your Phoenix application.

1 Like