This recipe will help you to setup a Cross-Origin Resource Sharing pipe in your application.
First you need an amber project generated with Amber CLI or from scratch.
config/application.crAmber::Server.configure dopipeline :api doplug Pipe::CORS.newendroutes :api do# your routes here...endend
Also see pipelines.