- Add firmware context module with upsert, query, and logging functions - Add FirmwareVersionFetcherWorker to fetch MikroTik RSS daily - Add Oban cron schedules (2 AM dev, 4 AM prod) - Add version change detection to Discovery module - Track firmware history with PubSub broadcasts - All tests passing Phase 3-5 of firmware tracking implementation complete. Next: LiveView UI indicators.
31 lines
744 B
Elixir
31 lines
744 B
Elixir
defmodule ToweropsWeb.DebugController do
|
|
@moduledoc """
|
|
Debug endpoints for development environment only.
|
|
"""
|
|
|
|
use ToweropsWeb, :controller
|
|
|
|
@doc """
|
|
Display all request headers for debugging cloudflared visitor location headers.
|
|
Only available in development environment.
|
|
"""
|
|
def headers(conn, _params) do
|
|
# Extract all request headers
|
|
headers = Map.new(conn.req_headers)
|
|
|
|
conn
|
|
|> put_resp_content_type("application/json")
|
|
|> send_resp(
|
|
200,
|
|
Jason.encode!(
|
|
%{
|
|
headers: headers,
|
|
remote_ip: conn.remote_ip |> :inet.ntoa() |> to_string(),
|
|
request_path: conn.request_path,
|
|
method: conn.method
|
|
},
|
|
pretty: true
|
|
)
|
|
)
|
|
end
|
|
end
|