We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb896bb commit 4343a30Copy full SHA for 4343a30
lib/ret/media_resolver.ex
@@ -669,19 +669,10 @@ defmodule Ret.MediaResolver do
669
nil
670
end
671
672
-defp get_root_host(host) do
673
- if String.ends_with?(host, ".co.uk") do
674
- host
675
- |> String.split(".")
676
- |> Enum.slice(-3..-1)
677
- |> Enum.join(".")
678
- else
679
680
681
- |> Enum.slice(-2..-1)
682
+ defp get_root_host(host) do
+ # Drop subdomains
+ host |> String.split(".") |> Enum.slice(-2..-1) |> Enum.join(".")
683
684
-end
685
686
defp get_imgur_headers() do
687
with client_id when is_binary(client_id) <- module_config(:imgur_client_id),
0 commit comments