Passing undefined in as the ProxyHeader argument causes a Dialyzer error because cowboy_http:init/6 specs it as ranch_proxy_header:proxy_info():
-spec init(pid(), ranch:ref(), inet:socket(), module(), ranch_proxy_header:proxy_info(), cowboy:opts()) -> ok.
However, request/5 function anticipates that ProxyHeader might actually be undefined which makes sense:
Req = case ProxyHeader of
undefined -> Req0;
_ -> Req0#{proxy_header => ProxyHeader}
end,
Could the spec for cowboy_http:init/6 be updated to accept undefined for the ProxyHeader argument?