Pagination: Don't be dos'd by random parameters.
This commit is contained in:
parent
e1a547d7d3
commit
7a1cb752dd
|
@ -67,7 +67,7 @@ def add_link_headers(conn, entries, extra_params) do
|
|||
defp build_pagination_fields(conn, min_id, max_id, extra_params) do
|
||||
params =
|
||||
conn.params
|
||||
|> Map.drop(Map.keys(conn.path_params) |> Enum.map(&String.to_atom/1))
|
||||
|> Map.drop(Map.keys(conn.path_params) |> Enum.map(&String.to_existing_atom/1))
|
||||
|> Map.merge(extra_params)
|
||||
|> Map.drop(@id_keys)
|
||||
|
||||
|
|
Loading…
Reference in New Issue