Fix request time cookie removing content-type header
This commit is contained in:
parent
e7ff21ace3
commit
0e2066b712
1 changed files with 1 additions and 6 deletions
|
@ -48,12 +48,7 @@ defmodule Mebe2.Web.Middleware.RequestTime do
|
|||
old_time = Process.get(@timer_key)
|
||||
diff = get_time() - old_time
|
||||
|
||||
%Raxx.Response{
|
||||
response
|
||||
| headers: [
|
||||
{"set-cookie", "#{@timer_cookie_name}=#{diff}; Max-Age=60"}
|
||||
]
|
||||
}
|
||||
Raxx.set_header(response, "set-cookie", "#{@timer_cookie_name}=#{diff}; Max-Age=60")
|
||||
end
|
||||
|
||||
defp get_time(), do: :erlang.monotonic_time(:micro_seconds)
|
||||
|
|
Reference in a new issue