mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
fix: endpoint migration when EXTERNAL_URL is not present (#1232)
For `URI.parse` to work the URI needs to be a FQDN otherwise `nil` is returned.
This commit is contained in:
@@ -32,7 +32,7 @@ defmodule FzHttp.Repo.Migrations.MoveWireguardOptionalFieldsToSites do
|
||||
|
||||
execute("""
|
||||
UPDATE sites
|
||||
SET endpoint = '#{URI.parse(System.get_env("EXTERNAL_URL", "localhost")).host}'
|
||||
SET endpoint = '#{URI.parse(System.get_env("EXTERNAL_URL", "https://localhost/")).host}'
|
||||
WHERE endpoint IS NULL
|
||||
""")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user