Jetty has a lot of interesting servlets and filters: https://www.eclipse.org/jetty/documentation/9.4.x/advanced-extras.html
These are features offered by https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-servlets.
Could be easily added (?).
I am using javalin for a webfacing app, so this is very much of interest to me too.
I do not have experience on how to do this with Jetty. But was looking for a way programmatically configure of jetty to enable this, using the example you provided with for the http2.
I haven't tested it yet, but I think it should be pretty easy. They have a description of how it works here: https://www.eclipse.org/jetty/documentation/9.4.x/dos-filter.html
We just need to add a app.enableDosFilter(dosFilterConfig).
I honestly think that should be handled by the reverse proxy?
@cwildfoerster that's a common (and good) approach, but not everyone uses one.
How about adding default filters? I may see issues with the EmbeddedJavalin use without jetty. I use javalin in a couple of standalone applications and migrated some legacy spark apps to javalin lately since you enabled EmbeddedJavalin.
@cwildfoerster default filters for what?
I may see issues with the EmbeddedJavalin use without jetty
If we add anything from the jetty-servlets package it will be completely optional. We don't even need to add them as app.enableDosFilter(...), we could do app.register(new DosFilter()).
While this could be nice, no one seems interested in it.
@tipsy Doesn't the new RateLimit functionality duplicate this of the DosFilter?
@georgeyanev Yes, sort of, but it's much simpler.
Most helpful comment
@cwildfoerster default filters for what?
If we add anything from the
jetty-servletspackage it will be completely optional. We don't even need to add them asapp.enableDosFilter(...), we could doapp.register(new DosFilter()).