Module: ElocalApiSupport::EnableCors::ClassMethods
- Defined in:
- lib/elocal_api_support/enable_cors.rb
Instance Attribute Summary collapse
-
#cors_allow_headers ⇒ Object
Returns the value of attribute cors_allow_headers.
-
#cors_allow_methods ⇒ Object
Returns the value of attribute cors_allow_methods.
-
#cors_allow_origin ⇒ Object
Returns the value of attribute cors_allow_origin.
Instance Method Summary collapse
Instance Attribute Details
#cors_allow_headers ⇒ Object
Returns the value of attribute cors_allow_headers.
9 10 11 |
# File 'lib/elocal_api_support/enable_cors.rb', line 9 def cors_allow_headers @cors_allow_headers end |
#cors_allow_methods ⇒ Object
Returns the value of attribute cors_allow_methods.
9 10 11 |
# File 'lib/elocal_api_support/enable_cors.rb', line 9 def cors_allow_methods @cors_allow_methods end |
#cors_allow_origin ⇒ Object
Returns the value of attribute cors_allow_origin.
9 10 11 |
# File 'lib/elocal_api_support/enable_cors.rb', line 9 def cors_allow_origin @cors_allow_origin end |
Instance Method Details
#cors_allow_all ⇒ Object
10 11 12 13 14 |
# File 'lib/elocal_api_support/enable_cors.rb', line 10 def cors_allow_all self.cors_allow_origin = '*' self.cors_allow_methods = %w(GET POST PUT DELETE).join(',') self.cors_allow_headers = %w(Origin Accept Content-Type X-Requested-With X-XSRF-Token).join(',') end |