If you are using Apache2 with FastCGI to pass traffic in using PHP-FPM, you may experience an unexpected 403 or 422 error for any endpoints that require authentication.
This is because Apache2 strips the Authentication
header by default when FastCGI is enabled.
In order to pass in the Authentication
header to PHP, add the following directive to your .htaccess file in Perfex CRM root:
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
Or add this to your virtual host configuration:
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1