feat: Add URL_PATH environment variable for reverse proxy deployments (#3771)

* Add URL_PATH environment variable for reverse proxy deployments

For example, this can be used to run TeslaMate behind a reverse proxy, using a
URL path such as "/teslamate".

* gettext: update pot and po files

Generated using:
  mix gettext.extract --merge

* web: run mix format

* gettext: update pot and po files

Re-generating gettext files after running mix format.

Generated using:
  mix gettext.extract --merge
This commit is contained in:
b1c1l1
2024-03-25 09:21:34 +01:00
committed by GitHub
parent 0e4320677d
commit 97cfb79493
22 changed files with 425 additions and 261 deletions
+5 -1
View File
@@ -144,7 +144,11 @@ end
config :teslamate, TeslaMateWeb.Endpoint,
http: Util.choose_http_binding_address(),
url: [host: System.get_env("VIRTUAL_HOST", "localhost"), port: 80],
url: [
host: System.get_env("VIRTUAL_HOST", "localhost"),
path: System.get_env("URL_PATH", "/"),
port: 80
],
secret_key_base: System.get_env("SECRET_KEY_BASE", Util.random_string(64)),
live_view: [signing_salt: System.get_env("SIGNING_SALT", Util.random_string(8))],
check_origin: System.get_env("CHECK_ORIGIN", "false") |> Util.parse_check_origin!()