OxygenFramework / Oxygen.jl

💨 A breath of fresh air for programming web apps in Julia
https://oxygenframework.github.io/Oxygen.jl/
MIT License
409 stars 25 forks source link

Is there a websocket max payload config option? #200

Open bryaan opened 3 months ago

bryaan commented 3 months ago

There should be a max payload size option for websockets to limit DOS attacks.

ndortega commented 3 months ago

Hi @bryaan,

As far as I know, this feature would have to be included in HTTP.jl in order for oxygen to use this. I'd recommend raising this issue over there.

In the meantime, I'd recommend creating either creating an authentication middleware function to restrict who can connect to your websocket or creating a rate-limiting middleware function. Oxygen automatically inserts the clients ip address into the context dictionary of each HTTP.Request.

bryaan commented 3 months ago

Opened here https://github.com/JuliaWeb/HTTP.jl/issues/1181