We have angular client application from which we are trying to redirect to WordPress’s page.
We have wordpress site as ‘https://acesheros.com’ and wordpress rest api authentication plugin is installed at miniorange.
We have configured ‘JWT Authentication’ to access ‘https://acesheros.com’ wordpress site with token endpoint as ‘https://acesheros.com/wp-json/api/v1/token’. We are able to get the ‘JWT token’ but while redirecting to ‘https://acesheros.com’ by passing token in header, its giving below error
Access to XMLHttpRequest at ‘https://acesheros.com/’ from origin ‘http://localhost:4200’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: Redirect is not allowed for a preflight request.
We also tried with passing below header but still no luck
‘Access-Control-Allow-Headers’: ‘Authorization, X-WP-Nonce, Content-Type, X-Requested-With’,
Is there any way/configuration to enable CORS at wordpress site or to whitelist domain?