edgurgel/poxa

Does it have the same 10kb limit as Pusher does?

TheRusskiy opened this issue · 3 comments

Does it have the same 10kb limit as Pusher does?

Yes it does!

test "valid_entity_length with data key bigger than 10KB" do
data = File.read! "test/more_than_10KB.data"
event = %PusherEvent{data: data}
expect(:cowboy_req, :set_resp_body, 2, :req2)
assert valid_entity_length(:req, %{event: event}) == {false, :req2, %{event: event}}
assert validate :cowboy_req
end

As far as I understand Pusher has it to limit client's ability to send unlimited data, but if it's self hosted, does it really make sense to have this limit? Make it optional at least?
@edgurgel

Yes, It is there to protect servers so that they don't get overloaded. I would accept a PR to make it configurable through Application env (config.exs). Then users could simple say: my limit is 1 GB, etc