Update http_security_plug.ex

This commit is contained in:
marcin mikołajczak 2022-12-08 15:38:42 +00:00
parent bacf0ddfd5
commit c100dc84da

View file

@ -177,7 +177,8 @@ defp build_csp_multimedia_source_list do
end
defp map_tile_server do
with tile_server <- Config.get([:frontend_configurations, :soapbox_fe, "tileServer"]),
with tile_server when is_binary(tile_server) <-
Config.get([:frontend_configurations, :soapbox_fe, "tileServer"]),
%{host: host} <- URI.parse(tile_server) do
"*.#{host}"
else