Make CORS great again
This fixes CORS to work properly with most 2.5 api endpoints while keeping the JSONP format available. * [x] return JSONP or JSON with proper CORS headers from API * [x] Field in Genereal Preferences Form to configure CORS enabled URLs See #17 for what triggered this refactor. I beleive this should make integrating the APIs on the client side trivial without mandating the use of JSONP.
This commit is contained in:
parent
e3785e25f9
commit
baa0f9ba77
7 changed files with 66 additions and 48 deletions
|
@ -24,7 +24,7 @@ class LoginController extends Zend_Controller_Action
|
|||
$stationLocale = Application_Model_Preference::GetDefaultLocale();
|
||||
|
||||
//Enable AJAX requests from www.airtime.pro for the sign-in process.
|
||||
CORSHelper::enableATProCrossOriginRequests($request, $response);
|
||||
CORSHelper::enableCrossOriginRequests($request, $response);
|
||||
|
||||
|
||||
Application_Model_Locale::configureLocalization($request->getcookie('airtime_locale', $stationLocale));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue