Enable security only in production mode