ajax - Play! 2.0 easy fix to OPTIONS response for router catch-all? -


having annoying issues making ajax calls because every browser these days making options call server before actual ajax call.

since using play! 2.0, there easy way make wildcard response route using options method?

for instance, in routes like: options /* controllers.options.responsedef

yes aware new play! doesn't have wildcard built-in, there needs solution since browsers increasingly calling options before ajax calls.

not quite wildcard, can use route spans several slash-segments:

options   /*wholepath     controllers.options.responsedef(wholepath) options   /               controllers.options.responsedef 

it should match requests:

options    /a options    /a/b options    /a/b/c 

note: that's top of head, maybe you'll need polish it. can't check myself.

check section dynamic parts spanning several / of manual.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c++ - Using OpenSSL in a multi-threaded application -

All overlapping substrings matching a java regex -