vertx-lang-scala-docs_2.12 3.8.0 API < Back
 

# Packages

-  package root
  Definition Classes
    root
-  package io
  Definition Classes
    root
-  package vertx
  Definition Classes
    io
-  package scala
  Definition Classes
    vertx
-  package ext
  Definition Classes
    scala
-  package web
  Definition Classes
    ext
-  package handler
  Definition Classes
    web
-  package sockjs
  Definition Classes
    handler
- AuthHandler
- BasicAuthHandler
- BodyHandler
- CSRFHandler
- ChainAuthHandler
- CookieHandler
- CorsHandler
- DigestAuthHandler
- ErrorHandler
- FaviconHandler
- FormLoginHandler
- JWTAuthHandler
- LoggerHandler
- OAuth2AuthHandler
- RedirectAuthHandler
- ResponseContentTypeHandler
- ResponseTimeHandler
- SessionHandler
- StaticHandler
- TemplateHandler
- TimeoutHandler
- UserSessionHandler
- VirtualHostHandler

c

io.vertx.scala.ext.web.handler

# CorsHandler 

###
Companion object CorsHandler

#### class CorsHandler extends Handler[RoutingContext]

A handler which implements server side http://www.w3.org/TR/cors/[CORS] support for Vert.x-Web.

Linear Supertypes
Handler[RoutingContext], AnyRef, Any
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. CorsHandler
2. Handler
3. AnyRef
4. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Instance Constructors

1.  new CorsHandler(_asJava: AnyRef)

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  def allowCredentials(allow: Boolean): CorsHandler

   Set whether credentials are allowed.

   Set whether credentials are allowed. Note that user agents will block requests that use a wildcard as origin and include credentials.

   From the MDN documentation you can read:

   > Important note: when responding to a credentialed request, server must specify a domain, and cannot use wild carding.

   * @param allow true if allowed
   returns

     a reference to this, so the API can be used fluently

5.  def allowedHeader(headerName: String): CorsHandler

   Add an allowed header * @param headerName the allowed header name

   Add an allowed header * @param headerName the allowed header name

   returns

     a reference to this, so the API can be used fluently

6.  def allowedHeaders(headerNames: Set[String]): CorsHandler

   Add a set of allowed headers * @param headerNames the allowed header names

   Add a set of allowed headers * @param headerNames the allowed header names

   returns

     a reference to this, so the API can be used fluently

7.  def allowedMethod(method: HttpMethod): CorsHandler

   Add an allowed method * @param method the method to add

   Add an allowed method * @param method the method to add

   returns

     a reference to this, so the API can be used fluently

8.  def allowedMethods(methods: Set[HttpMethod]): CorsHandler

   Add a set of allowed methods * @param methods the methods to add

   Add a set of allowed methods * @param methods the methods to add

   returns

     a reference to this, so the API can be used fluently

9.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
10.  def asJava: AnyRef
11.  def clone(): AnyRef
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @native() @throws( ... )
12.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
13.  def equals(arg0: Any): Boolean
    Definition Classes
      AnyRef → Any
14.  def exposedHeader(headerName: String): CorsHandler

    Add an exposed header * @param headerName the exposed header name

    Add an exposed header * @param headerName the exposed header name

    returns

      a reference to this, so the API can be used fluently

15.  def exposedHeaders(headerNames: Set[String]): CorsHandler

    Add a set of exposed headers * @param headerNames the exposed header names

    Add a set of exposed headers * @param headerNames the exposed header names

    returns

      a reference to this, so the API can be used fluently

16.  def finalize(): Unit
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )
17.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
18.  def handle(arg0: RoutingContext): Unit
    Definition Classes
      CorsHandler → Handler
19.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
20.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
21.  def maxAgeSeconds(maxAgeSeconds: Int): CorsHandler

    Set how long the browser should cache the information * @param maxAgeSeconds max age in seconds

    Set how long the browser should cache the information * @param maxAgeSeconds max age in seconds

    returns

      a reference to this, so the API can be used fluently

22.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
23.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
24.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
25.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
26.  def toString(): String
    Definition Classes
      AnyRef → Any
27.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
28.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
29.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @native() @throws( ... )

### Inherited from Handler[RoutingContext]

### Inherited from AnyRef

### Inherited from Any

### Ungrouped