Errors requesting data from local Ensemble FHIR Repository

Hoping someone can help.

I'm trying to request data from my local FHIR repository using a simple client ( using SMART ). I get the following CORS error in Firebug.

"NetworkError: 406 Not Acceptable - http://localhost:57775/csp/healthshare/fhirserver/fhir/Patient/1"
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:57775/csp/healthshare/fhirserver/fhir/Patient/1. (Reason: CORS header 'Access-Control-Allow-Origin' missing).

I can request data with no problems using the Chrome RESTClient. I can also request data from other public FHIR end points with no problems.

I've played around with adding additional Http headers to the request but haven't had any success.

Is there something I have to configure in Ensemble to enable CORS ? Perhaps it's another issue?

Please let me know if you've come across this issue.

Thanks,

Conor

  • 0
  • 0
  • 253
  • 1
  • 1

Answers

Hi Conor,

You message seems to indicate that you have constructed your own REST dispatch class - extending %CSP.REST - and are using it for your CSP application Dispatch Class.

If that is the case, please check to ensure that your subclass overrides the HandleCorsRequest class parameter, like this:

Parameter HandleCorsRequest As %Integer = 1;

 

Regards,

Paul Lomayesva