Live Dashboard behind a reverse proxy not working under a namespace

endpoint.ex

  socket "/live", Phoenix.LiveView.Socket,
    websocket: [connect_info: [session: @session_options]]#,
    # longpoll: true

  socket "/app/live", Phoenix.LiveView.Socket,
    websocket: [connect_info: [session: @session_options]]#,
    # longpoll: true

app.js

et liveSocket = new LiveSocket("/app/live", Socket, {params: {_csrf_token: csrfToken}//,
//transport: LongPoll})

route.ex

  import Phoenix.LiveDashboard.Router

  scope "/app" do
    pipe_through [:browser, :log, :basic_auth]

    live_dashboard "/dashboard",
      metrics: AppWeb.Telemetry,
      ecto_repos: [App.Repo],
      ecto_psql_extras_options: [long_running_queries: [threshold: "200 milliseconds"]]
  end
1 Like