<?php
class ApiController extends Yaf_Controller_Abstract
{
public function corsAction()
{
// Assuming the browser sends a CORS preflight request
if ($this->getRequest()->isOptions()) {
$this->getResponse()
->setHeader("Allow", "GET, POST, OPTIONS")
->setBody("");
return false;
}
}
}
?>