Categories Archives

RESTfull

Resolve CORS and CORB in CodeIgniter 4 🔥

Resolve CORS (Cross-Origin Resource Sharing) in CodeIgniter 4 🔥: The browsers, before execute real request, execute pre-flight request (see https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request), pre-flight request use ‘OPTIONS’ method. This is general and insecure solution, you have to customize this solution for you. In routes.php file add ‘options’ route: In “YourControllerName.php”, setting correct headers and correct status code: Resolve CORB (Cross-Origin Read Blocking) in …