Cors

smithy.api.Cors
See theCors companion object
final case class Cors(origin: NonEmptyString, maxAge: Int, additionalAllowedHeaders: Option[List[NonEmptyString]], additionalExposedHeaders: Option[List[NonEmptyString]])

Defines how a service supports cross-origin resource sharing.

Value parameters

additionalAllowedHeaders

The names of headers that should be included in the Access-Control-Allow-Headers header in responses to preflight OPTIONS requests. This list will be used in addition to the names of all request headers bound to an input data member via the httpHeader, as well as any headers required by the protocol or authentication scheme.

additionalExposedHeaders

The names of headers that should be included in the Access-Control-Expose-Headers header in all responses sent by the service. This list will be used in addition to the names of all request headers bound to an output data member via the httpHeader, as well as any headers required by the protocol or authentication scheme.

maxAge

The maximum number of seconds for which browsers are allowed to cache the results of a preflight OPTIONS request. Defaults to 600, the maximum age permitted by several browsers. Set to -1 to disable caching entirely.

origin

The origin from which browser script-originating requests will be allowed.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product