From 6247744f705265b5cfa830439e8e60478ad7b4e8 Mon Sep 17 00:00:00 2001 From: James Harton Date: Mon, 2 Dec 2019 18:05:29 +1300 Subject: [PATCH] Fix origin checking for local network and remote access. --- augie/config/releases.exs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/augie/config/releases.exs b/augie/config/releases.exs index af4254c..80d97ce 100644 --- a/augie/config/releases.exs +++ b/augie/config/releases.exs @@ -6,6 +6,14 @@ config :augie, AugieWeb.Endpoint, http: [:inet, port: 80], live_view: [ signing_salt: System.get_env("LIVE_VIEW_SIGNING_SALT") + ], + check_origin: [ + # If public device URL is enabled in balena cloud + "https://#{System.get_env("BALENA_DEVICE_UUID")}.balena-devices.com", + # Using local network mdns. + "http://#{System.get_env("HOSTNAME")}.local/", + # Directly by IP address on the local LAN. + "http://192.168.*.*/" ] # config :logger, level: :debug