Add overridable cacertfile (#21)
diff --git a/lib/dart_sass.ex b/lib/dart_sass.ex
index 07713f2..186bcaa 100644
--- a/lib/dart_sass.ex
+++ b/lib/dart_sass.ex
@@ -364,7 +364,7 @@ defmodule DartSass do
end
# https://erlef.github.io/security-wg/secure_coding_and_deployment_hardening/inets
- cacertfile = CAStore.file_path() |> String.to_charlist()
+ cacertfile = cacertfile() |> String.to_charlist()
http_options = [
autoredirect: false,
@@ -395,4 +395,8 @@ defmodule DartSass do
raise "couldn't fetch #{url}: #{inspect(other)}"
end
end
+
+ defp cacertfile() do
+ Application.get_env(:dart_sass, :cacerts_path) || CAStore.file_path()
+ end
end