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)


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

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)


104
105
106
# File 'sig/types.rbs', line 104

def allow_credentials
  @allow_credentials
end

#allowed_headersArray[String]?

Returns the value of attribute allowed_headers.

Returns:

  • (Array[String], nil)


101
102
103
# File 'sig/types.rbs', line 101

def allowed_headers
  @allowed_headers
end

#allowed_methodsArray[String]?

Returns the value of attribute allowed_methods.

Returns:

  • (Array[String], nil)


100
101
102
# File 'sig/types.rbs', line 100

def allowed_methods
  @allowed_methods
end

#allowed_originsArray[String]?

Returns the value of attribute allowed_origins.

Returns:

  • (Array[String], nil)


99
100
101
# File 'sig/types.rbs', line 99

def allowed_origins
  @allowed_origins
end

#expose_headersArray[String]?

Returns the value of attribute expose_headers.

Returns:

  • (Array[String], nil)


102
103
104
# File 'sig/types.rbs', line 102

def expose_headers
  @expose_headers
end

#max_ageInteger?

Returns the value of attribute max_age.

Returns:

  • (Integer, nil)


103
104
105
# File 'sig/types.rbs', line 103

def max_age
  @max_age
end

Class Method Details

.defaultCorsConfig

Returns:



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

def self.default: () -> CorsConfig

Instance Method Details

#allowed_headers_joinedString

Returns:

  • (String)


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

def allowed_headers_joined: () -> String

#allowed_methods_joinedString

Returns:

  • (String)


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

def allowed_methods_joined: () -> String

#is_method_allowedBoolean

Parameters:

  • method (String)

Returns:

  • (Boolean)


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

def is_method_allowed: (String method) -> bool

#is_origin_allowedBoolean

Parameters:

  • origin (String)

Returns:

  • (Boolean)


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

def is_origin_allowed: (String origin) -> bool