• Resolved arjunmurali1993

    (@arjunmurali1993)


    Hi,

    I’m testing an Angular Application on localhost:4200 to use my WordPress Woocommerce Site’s user credentials using this OAuth Server plugin. I’m able to redirect the users to the /wp-content/plugins/miniorange-oauth-20-server/web/moserver/authorize endpoint, get the user consent and then get the authorization code.

    However, when I do a post request to the /wp-content/plugins/miniorange-oauth-20-server/web/moserver/token endpoint with all the correct details, I keep getting the following error :

    Access to XMLHttpRequest at 'https://mydomain.com/wp-content/plugins/miniorange-oauth-20-server/web/moserver/token' from origin 'https://localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

    I don’t want to completely enable CORS and create security issues, since the Woocommerce store is a live one. Is there any way by which I can allow post requests from localhost for now during testing and then once deployed, allow requests from the application’s URL?

    Can you please help me out?

    Regards,
    Arjun

Viewing 1 replies (of 1 total)
  • Plugin Author miniOrange

    (@cyberlord92)

    Hi Arjun,

    Thanks for reaching out to us.

    Currently we are looking into it and we’ll get back to you soon with a solution.

    If you have any questions or queries you can raise a support ticket using our support form in the plugin.

Viewing 1 replies (of 1 total)
  • The topic ‘Blocked by CORS Policy’ is closed to new replies.