CORS request is failing
written-by
Pooja Bhambani
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
legacy-article
learn-legacy-article-disclaimer-text
Resolution
- There is an issue with the authorization header and the preflight. Hence, please add the
Access-Control-Allow-Headers: Origin, Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers, Authorizationin the CORS configuration.
- And, make sure to add API endpoint in CORS configuration (for e.g. /o/headless-delivery/*)
did-this-article-resolve-your-issue