Access to XMLHttpRequest at (angular with PHP)

Access to XMLHttpRequest at ‘localhost/AngularLoginRegister/insert.php’ from origin ‘localhost:4200’ has been blocked by CORS policy: Request header field Authorization is not allowed by Access-Control-Allow-Headers in preflight response.

I create a .htaccess file and add this code:-

Set the headers for the restful API

Header always set Access-Control-Allow-Origin [http:// localhost:4200]
Header always set Access-Control-Max-Age “1000”

Header always set Access-Control-Allow-Headers "X-Requested-With, Content-Type, Origin, Authorization,

Header always set Access-Control-Allow-Origin “*”

Header always set Access-Control-Allow-Headers “Origin, X-Requested-With, Content-Type, Access-Control-Allow-Origin”

Header always set Access-Control-Allow-Methods “PUT, GET, POST, DELETE, OPTIONS”