Method: Webservice::Base#before

Defined in:
lib/webservice/base/base.rb

#beforeObject

note: before (filter) for now is just a method (NOT a chain for blocks, etc.);

override method to change before (filter)


11
12
13
14
15
16
17
18
# File 'lib/webservice/base/base.rb', line 11

def before
   ### move cors headers to responseHandler to initialize!!!! - why? why not??

   ## (auto-)add (merge in) cors headers

   ##   todo: move into a before filter ??  lets you overwrite headers - needed - why? why not??

   headers 'Access-Control-Allow-Origin'  => '*',
           'Access-Control-Allow-Headers' => 'Authorization,Accepts,Content-Type,X-CSRF-Token,X-Requested-With',
           'Access-Control-Allow-Methods' => 'GET,POST,PUT,DELETE,OPTIONS'
end