Class: Navigable::Server::CORS
- Inherits:
-
Object
- Object
- Navigable::Server::CORS
- Defined in:
- lib/navigable/server/cors.rb
Defined Under Namespace
Classes: Middleware
Class Method Summary collapse
Class Method Details
.config {|_self| ... } ⇒ Object
5 6 7 |
# File 'lib/navigable/server/cors.rb', line 5 def config yield(self) end |
.headers ⇒ Object
9 10 11 |
# File 'lib/navigable/server/cors.rb', line 9 def headers @headers ||= {} end |
.headers=(headers) ⇒ Object
13 14 15 16 17 |
# File 'lib/navigable/server/cors.rb', line 13 def headers=(headers) raise ArgumentError.new("Expected headers to be a Hash, received a #{headers.class} instead") unless headers.is_a?(Hash) @headers = headers end |