Skip to content

Commit

Permalink
Make middlewares package private MiddlewareRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
amitksingh1490 committed Jan 10, 2022
1 parent 5abd755 commit 35770d7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import io.netty.handler.codec.http.HttpHeaderNames
import zhttp.http.Headers.BasicSchemeName
import zhttp.http._

trait AuthMiddlewares {
private[zhttp] trait AuthMiddlewares {

/**
* Creates an authentication middleware that only allows authenticated requests to be passed on to the app.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import io.netty.handler.codec.http.HttpHeaderNames
import zhttp.http._
import zhttp.http.middleware.CORS.DefaultCORSConfig

trait CorsMiddlewares {
private[zhttp] trait CorsMiddlewares {

/**
* Creates a middleware for Cross-Origin Resource Sharing (CORS).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import zio.{UIO, ZIO}

import java.util.UUID

trait CsrfMiddlewares {
private[zhttp] trait CsrfMiddlewares {

/**
* CSRF middlewares : To prevent Cross-site request forgery attacks. This middleware is modeled after the double
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import java.io.IOException
/**
* Middlewares on an HttpApp
*/
trait HttpMiddlewares extends CorsMiddlewares with CsrfMiddlewares with AuthMiddlewares {
private[zhttp] trait HttpMiddlewares extends CorsMiddlewares with CsrfMiddlewares with AuthMiddlewares {

/**
* Logical operator to decide which middleware to select based on the predicate.
Expand Down

1 comment on commit 35770d7

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance Benchmark:

Concurrency: 256
Requests/sec: 842604.04

Please sign in to comment.