CLI curl command is working but the plugin output in icinga web is showing errors(Serial Based Devices API)

We made a Plugin for checking status of serial based devices.By running the curl (curl -v http://ip-address:5050/hardware-status)command in terminal we were getting error free output.Whereas in icinga web its showing errors.I am attaching screenshots for reference.Your support is required.

terminal output
icinga

Permission denied may indicate that your check is restricted by SELinux. What Linux distribution are you using?

Another possible way to get something like this: you’re probably running the check as a different user and you can create firewall rules matching on users information with iptables and nftables.

Thankyou for your support @jbrost . The error got resolved after setting selinux in permissive mode.

sestatus
script permissions
hardware status
icinga1
icinga2