Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ config :live_debugger, :debug_button?, false

# Disables only components highlighting
config :live_debugger, :highlighting?, false

# Used when LiveDebugger's assets are exposed on other address (e.g. when run inside Docker)
config :live_debugger, :external_url, "http://localhost:9007"
```

### Content Security Policy
Expand Down
3 changes: 3 additions & 0 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ config :live_debugger, :debug_button?, false

# Disables only components highlighting
config :live_debugger, :highlighting?, false

# Used when LiveDebugger's assets are exposed on other address (e.g. when run inside Docker)
config :live_debugger, :external_url, "http://localhost:9007"
```

### Content Security Policy
Expand Down
5 changes: 3 additions & 2 deletions lib/live_debugger.ex
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,14 @@ defmodule LiveDebugger do
defp put_live_debugger_tags(config) do
ip_string = config |> Keyword.get(:ip, @default_ip) |> :inet.ntoa() |> List.to_string()
port = Keyword.get(config, :port, @default_port)
live_debugger_url = "http://#{ip_string}:#{port}"

browser_features? = Keyword.get(config, :browser_features?, true)
debug_button? = Keyword.get(config, :debug_button?, true)
highlighting? = Keyword.get(config, :highlighting?, true)
external_url = Keyword.get(config, :external_url, live_debugger_url)

live_debugger_url = "http://#{ip_string}:#{port}"
live_debugger_assets_url = "http://#{ip_string}:#{port}/#{@assets_path}"
live_debugger_assets_url = "#{external_url}/#{@assets_path}"
Comment thread
GuzekAlan marked this conversation as resolved.

assigns = %{
url: live_debugger_url,
Expand Down