CodeIgniter Forums

Full Version: API Exceptions & Detailed Errors Shown in Production Environment CI 4.04
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I am using version. 4.04 I created some restful APIs and was checking the exception handling by using wrong controller names etc in PRODUCTION environment.

To my surprise its showing detailed errors while I have already set environment to production in .env file. In the browser its not showing anything but in postman its sending detailed error reports.

Do I need to make any further changes to stop this detailed error reporting in APIs.

Regards
You could try setting it in the .htaccess file at top.


SetEnv CI_ENVIRONMENT 'production'