Redirect to Wordpress site from client app giving CORS error

  • rohini kajave
    # 12 months ago


    We have angular client application from which we are trying to redirect to WordPress’s page.
    We have wordpress site as ‘’ and wordpress rest api authentication plugin is installed at miniorange.

    We have configured ‘JWT Authentication’ to access ‘’ wordpress site with token endpoint as ‘’. We are able to get the ‘JWT token’ but while redirecting to ‘’ by passing token in header, its giving below error

    Access to XMLHttpRequest at ‘’ 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’,
    ‘Access-Control-Allow-Origin’: ‘*’,
    ‘Access-Control-Allow-Methods’: ‘POST,GET,OPTIONS,PUT,DELETE’,
    ‘Access-Control-Allow-Credentials’: ‘true’

    Is there any way/configuration to enable CORS at wordpress site or to whitelist domain?

    Any help will be appreacited.

    Thank you.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.