Hello, community, I hope this finds you well, this is to bring to your notice that while we were developing the OCL for OpenMRS, we had some CORS challenges. This only happened when we tried to use the PUT method for adding existing CIEL concepts to a given dictionary.
We have tried to solve the issue via the frontend but unfortunately, we have not yet succeeded. We are thinking that this might be solved from the backend of the OclApi.
Are you actually making cross origin requests? If no, I wonder why it only fails for PUT? I’d imagine it should be failing even for the other http methods.
Your are right @wyclif , we were also wondering why PUT only yet GET and POST can work but we found out that Its possible for a PUT and DELETE to fail while GET and POST are working so there might be some configurations we need to make.
@hadijah315 you were given some suggestions to try out on this thread. Can you explicitly report back that you tried A, B, or C and what the outcome was?
Thanks @dkayiwa, so the suggestion @topseysuave gave, I tried it this morning, it did not work, I actually had a sync with him but still it could not solve the CORS instead It crashed the whole application. So we decided to wait for other ideas on how we can go about it.
@hadijah315 FWIW, did you try a couple of links returned by googling with “Method PUT is not allowed by Access-Control-Allow-Methods in preflight response”?