Where do I set Custom Headers as default?

I would like to change the default headers which are sent out to
include these CORS headers:

Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, GET, PUT, DELETE, OPTIONS
Access-Control-Allow-Headers: X-PINGOTHER
Content-Type: application/json; charset=UTF-8

Could someone tell me where it is that I specify this?

Please and thank you!

AJ ONeal

Assuming that you are on Rails 2.3 or higher, I would use a rack middleware for that. You have an example at http://www.hokstad.com/rewriting-content-types-with-rack.html

Keep in mind that the Rack config file in Rails is replaced by adding the rack middleware to environment.rb instead with:

config.middleware.use NameOfMiddleWareClass

Best regards

Peter De Berdt