[Bugfix] Fix basic auth in deployed apps (#52)

* Renamed auth env vars and updated them to work in prod env

* Updated basic auth parsing to ignore empty strings
This commit is contained in:
Kieran authored and GitHub committed 2024-03-04 18:29:26 -08:00
1 parent a4f4afeac9
commit 82eb12b983
5 files changed
+22 -5

No files matched your search

+9
View File
@@ -44,5 +44,14 @@ defmodule PinchflatWeb.RoutingTest do
assert conn.status == 200
end
test "it treats empty strings as not being set when using basic auth", %{conn: conn} do
Application.put_env(:pinchflat, :basic_auth_username, "")
Application.put_env(:pinchflat, :basic_auth_password, "pass")
conn = get(conn, "/")
assert conn.status == 200
end
end
end