Cors Phalcon Php

[Solved] Cors Phalcon Php | Php - Code Explorer | yomemimo.com
Question : cors phalcon php

Answered by : thariq-farsha

$app->options( '/{catch:(.*)}', function() use ($app) { $app->response->setStatusCode(200, "OK")->send();
});

Source : | Last Update : Fri, 12 Aug 22

Question : cors phalcon php

Answered by : thariq-farsha

$app->before(
function () use ($app) { $origin = $app->request->getHeader("ORIGIN") ? $app->request->getHeader("ORIGIN") : '*'; $app->response->setHeader("Access-Control-Allow-Origin", $origin) ->setHeader("Access-Control-Allow-Methods", 'GET,PUT,POST,DELETE,OPTIONS') ->setHeader("Access-Control-Allow-Headers", 'Origin, X-Requested-With, Content-Range, Content-Disposition, Content-Type, Authorization') ->setHeader("Access-Control-Allow-Credentials", true); return true;
});

Source : https://forum.phalcon.io/discussion/17171/phalcon-micro-rest-api-cors-header-accesscontrolalloworigin-miss | Last Update : Fri, 12 Aug 22

Answers related to cors phalcon php

Code Explorer Popular Question For Php