-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix external trusted proxies env usage #1450
Conversation
Pull Request Test Coverage Report for Build 3d699c240ed22827bcd71f44917e04bd1748b6c9-PR-1450
💛 - Coveralls |
@@ -9,12 +9,12 @@ defmodule FzHttpWeb.HeaderHelpers do | |||
|
|||
def clients, do: FzHttp.Config.fetch_env!(:fz_http, :private_clients) | |||
|
|||
def proxied?, do: not (external_trusted_proxies() == false) | |||
def proxied?, do: external_trusted_proxies() != [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jamilbk the old condition never returned false
, because it was always comparing a list to a boolean: [] == false
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed this too. Thanks for the fix and test!
@@ -9,12 +9,12 @@ defmodule FzHttpWeb.HeaderHelpers do | |||
|
|||
def clients, do: FzHttp.Config.fetch_env!(:fz_http, :private_clients) | |||
|
|||
def proxied?, do: not (external_trusted_proxies() == false) | |||
def proxied?, do: external_trusted_proxies() != [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed this too. Thanks for the fix and test!
ref https://discourse.firez.one/t/environment-variables-errors/440/4