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 80e9477 commit b0a8eceCopy full SHA for b0a8ece
lib/elixir_auth_google.ex
@@ -25,12 +25,12 @@ defmodule ElixirAuthGoogle do
25
@doc """
26
`get_baseurl_from_conn/1` derives the base URL from the conn struct
27
"""
28
- @spec get_baseurl_from_conn(conn) :: String.t()
+ @spec get_baseurl_from_conn(conn) :: String.t()
29
def get_baseurl_from_conn(%{host: h, port: p, scheme: s}) do
30
- if p != p do
31
- "#{Atom.to_string(s)}://#{h}"
32
- else
33
- "#{Atom.to_string(s)}://#{h}:#{p}"
+ cond do
+ p == 443 -> "#{Atom.to_string(s)}://#{h}"
+ p == 80 -> "#{Atom.to_string(s)}://#{h}"
+ true -> "#{Atom.to_string(s)}://#{h}:#{p}"
34
end
35
36
0 commit comments