Class: Spikard::CorsConfig

Inherits:
Object
  • Object
show all
Defined in:
sig/types.rbs

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCorsConfig

Returns a new instance of CorsConfig.

Parameters:

  • allowed_origins: (Array[String])
  • allowed_methods: (Array[String])
  • allowed_headers: (Array[String])
  • expose_headers: (Array[String])
  • max_age: (Integer)
  • allow_credentials: (Boolean)


122
# File 'sig/types.rbs', line 122

def initialize: (?allowed_origins: Array[String], ?allowed_methods: Array[String], ?allowed_headers: Array[String], ?expose_headers: Array[String], ?max_age: Integer, ?allow_credentials: bool) -> void

Instance Attribute Details

#allow_credentialsBoolean?

Returns the value of attribute allow_credentials.

Returns:

  • (Boolean, nil)


120
121
122
# File 'sig/types.rbs', line 120

def allow_credentials
  @allow_credentials
end

#allowed_headersArray[String]?

Returns the value of attribute allowed_headers.

Returns:

  • (Array[String], nil)


117
118
119
# File 'sig/types.rbs', line 117

def allowed_headers
  @allowed_headers
end

#allowed_methodsArray[String]?

Returns the value of attribute allowed_methods.

Returns:

  • (Array[String], nil)


116
117
118
# File 'sig/types.rbs', line 116

def allowed_methods
  @allowed_methods
end

#allowed_originsArray[String]?

Returns the value of attribute allowed_origins.

Returns:

  • (Array[String], nil)


115
116
117
# File 'sig/types.rbs', line 115

def allowed_origins
  @allowed_origins
end

#expose_headersArray[String]?

Returns the value of attribute expose_headers.

Returns:

  • (Array[String], nil)


118
119
120
# File 'sig/types.rbs', line 118

def expose_headers
  @expose_headers
end

#max_ageInteger?

Returns the value of attribute max_age.

Returns:

  • (Integer, nil)


119
120
121
# File 'sig/types.rbs', line 119

def max_age
  @max_age
end

Class Method Details

.defaultCorsConfig

Returns:



127
# File 'sig/types.rbs', line 127

def self.default: () -> CorsConfig

Instance Method Details

#allowed_headers_joinedString

Returns:

  • (String)


124
# File 'sig/types.rbs', line 124

def allowed_headers_joined: () -> String

#allowed_methods_joinedString

Returns:

  • (String)


123
# File 'sig/types.rbs', line 123

def allowed_methods_joined: () -> String

#is_method_allowedBoolean

Parameters:

  • method (String)

Returns:

  • (Boolean)


126
# File 'sig/types.rbs', line 126

def is_method_allowed: (String method) -> bool

#is_origin_allowedBoolean

Parameters:

  • origin (String)

Returns:

  • (Boolean)


125
# File 'sig/types.rbs', line 125

def is_origin_allowed: (String origin) -> bool