Skip to content

Instantly share code, notes, and snippets.

@danielreuterwall
Created January 9, 2015 22:04
Show Gist options
  • Save danielreuterwall/21ae63fa9cb2385ce25b to your computer and use it in GitHub Desktop.
Save danielreuterwall/21ae63fa9cb2385ce25b to your computer and use it in GitHub Desktop.
public static class CorsAction extends Action.Simple {
public Result call(Context context) throws Throwable{
Response response = context.response();
response.setHeader("Access-Control-Allow-Origin", *);
response.setHeader("Access-Control-Allow-Headers","X-Requested-With");
return delegate.call(context);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment