matheus.myriad_27341
10/04/2024, 10:18 PMAccess to fetch at ‘https://api.demo.*.com/fhir/R4/Questionnaire/64878bfc-3412-48e3-bb47-4760a907cbcf’ from origin ’https://provider.demo.*.com’ 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. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.
Context:
I have a self-hosted instance of the Medplum server deployed using CDK. I’m facing CORS errors because the client attempting to make requests to the server is on a different domain.
Problem:
I followed the instructions from the documentation (https://www.medplum.com/docs/self-hosting/config-settings#server-config), including the following steps (not in this particular order):
- Manually added the “allowedOrigins” parameter in AWS System Manager associated with my environment.
- Updated the server config with the “allowedOrigins” as per the instructions here (https://www.medplum.com/docs/self-hosting/install-on-aws#update-the-server-config).
- Tried upgrading the AWS infrastructure as suggested here (https://www.medplum.com/docs/self-hosting/install-on-aws#upgrade-aws-infrastructure).
- Tried updating the server using the command npx medplum aws update-server [env name].
- Performed a new deployment.
- Manually restarted the server in AWS.
Question:
Any ideas on what I might have done wrong or what else I can try to fix this issue?albert_wong
02/15/2025, 10:37 PMreshma
02/16/2025, 4:28 PMalbert_wong
02/16/2025, 5:48 PMalbert_wong
02/17/2025, 12:22 AMalbert_wong
02/17/2025, 12:48 AMalbert_wong
02/17/2025, 1:34 AMreshma
02/17/2025, 4:20 PMalbert_wong
02/19/2025, 9:36 AM