mirror of
https://github.com/teslamate-org/teslamate.git
synced 2026-01-24 21:06:08 +08:00
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:
+5
-1
@@ -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!()
|
||||
|
||||
Reference in New Issue
Block a user