CORS

org.http4s.server.middleware.CORS$
object CORS

Implements the CORS protocol. The actual middleware is a CORSPolicy, which can be obtained via policy.

Attributes

See also
Source
CORS.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
CORS.type

Members list

Value members

Deprecated methods

Attributes

Deprecated
true
Source
CORS.scala
def apply[F[_], G[_]](http: Http[F, G], config: CORSConfig)(implicit F: Applicative[F]): Http[F, G]

CORS middleware This middleware provides clients with CORS information based on information in CORS config. Currently, you cannot make permissions depend on request details

CORS middleware This middleware provides clients with CORS information based on information in CORS config. Currently, you cannot make permissions depend on request details

Attributes

Deprecated
true
Source
CORS.scala
def httpApp[F[_] : Applicative](httpApp: HttpApp[F]): HttpApp[F]

Attributes

Deprecated
true
Source
CORS.scala
def httpRoutes[F[_] : Monad](httpRoutes: HttpRoutes[F]): HttpRoutes[F]

Attributes

Deprecated
true
Source
CORS.scala

Concrete fields

The default CORS policy:

The default CORS policy:

  • Sends Access-Control-Allow-Origin: *
  • Sends no Access-Control-Allow-Credentials
  • Sends no Access-Control-Expose-Headers
  • Sends Access-Control-Allow-Methods: GET, HEAD, POST
  • Reflects request's Access-Control-Request-Headers as Access-Control-Allow-Headers
  • Sends no Access-Control-Max-Age

Attributes

Source
CORS.scala

Deprecated fields

Attributes

Deprecated
true
Source
CORS.scala