SuiteCRM icon indicating copy to clipboard operation
SuiteCRM copied to clipboard

Fix #10462 - Add PATCH method to Access-Control-Allow-Methods header …

Open michaelG42 opened this issue 7 months ago • 3 comments

Fix #10462 - Add PATCH method to Access-Control-Allow-Methods header to resolve CORS error

Description

This pull request fixes a CORS error by adding the PATCH method to the Access-Control-Allow-Methods header in the SuiteCRM V8 API configuration file. The CORS error occurs when making PATCH requests from a browser, which is required to update records via the SuiteCRM V8 API.

Motivation and Context

This change is required to resolve a CORS error that prevents PATCH requests from being accepted when made from a browser. Without this fix, users are unable to update records via the SuiteCRM V8 API using a PATCH request due to the missing method in the CORS policy.

How To Test This

  1. Make a PATCH request to the SuiteCRM V8 API from a browser.
  2. Verify that the CORS error is resolved and the request is successful.

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • [x] My code follows the code style of this project found here.
  • [ ] My change requires a change to the documentation.
  • [x] I have read the How to Contribute guidelines.

michaelG42 avatar Jul 02 '24 11:07 michaelG42