Cors
wvlet.airframe.http.filter.Cors
object Cors extends LogSupport
Attributes
- Graph
-
- Supertypes
-
trait LogSupporttrait LazyLoggertrait LoggingMethodstrait Serializableclass Objecttrait Matchableclass AnyShow all
- Self type
-
Cors.type
Members list
Type members
Classlikes
case class Policy(allowsOrigin: String => Option[String], allowsMethods: String => Option[Seq[String]], allowsHeaders: (Seq[String]) => Option[Seq[String]], exposedHeaders: Seq[String], supportsCredentials: Boolean, maxAge: Option[Duration])
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Value members
Concrete methods
Create a new RxHttpFilter to add headers to support Cross-origin resource sharing (CORS).
Create a new RxHttpFilter to add headers to support Cross-origin resource sharing (CORS).
Cors.newFilter(
Cors.Policy(
allowsOrigin = origin => { origin match {
case x if x.endsWith("mydomain.com") => Some(origin)
case _ => None
}},
allowsMethods = _ => Some(Seq(HttpMethod.POST)),
allowsHeaders = headers => Some(headers)
))
Attributes
A CORS policy that lets you do whatever you want. Don't use this in production.
A CORS policy that lets you do whatever you want. Don't use this in production.
Attributes
Inherited methods
Attributes
- Inherited from:
- LoggingMethods
Attributes
- Inherited from:
- LoggingMethods
Attributes
- Inherited from:
- LoggingMethods
Attributes
- Inherited from:
- LoggingMethods
Attributes
- Inherited from:
- LoggingMethods
Attributes
- Inherited from:
- LoggingMethods
Attributes
- Inherited from:
- LoggingMethods
Attributes
- Inherited from:
- LoggingMethods
Attributes
- Inherited from:
- LoggingMethods
Attributes
- Inherited from:
- LoggingMethods
Attributes
- Inherited from:
- LoggingMethods
In this article