Overview
When using the output from Drupal’s JSON:API in a separate application, a CORS error occurred. Here, I explain how to resolve the CORS error.
Solution
Copy the following file:
/web/sites/default/default.services.yml
Then, set enabled to true in cors.config:
As a result, the CORS error was resolved.
Summary
I hope this serves as a useful reference for anyone experiencing a similar issue.