http: rework connection timeouts to match hackney docs, enforce 1 second max TCP...
[akkoma] / lib / pleroma / web / mastodon_api / mastodon_api_controller.ex
index 4fe66f8567acc85795a6cff6355d41b2c589036e..26921d3862b481f66649271240026a492b15c6c8 100644 (file)
@@ -190,6 +190,11 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
   end
 
   defp add_link_headers(conn, method, activities, param \\ nil, params \\ %{}) do
+    params =
+      conn.params
+      |> Map.drop(["since_id", "max_id"])
+      |> Map.merge(params)
+
     last = List.last(activities)
     first = List.first(activities)
 
@@ -1447,7 +1452,6 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
                url,
                [],
                adapter: [
-                 timeout: timeout,
                  recv_timeout: timeout,
                  pool: :default
                ]