Stream: clinFHIR
Topic: CORS
Jayashree Surnar (Apr 25 2017 at 09:31):
hello @David Hay . when i add our server in clinfhir it's displaying the fallowing error.
Error loading models: {"data":null,"status":-1,"config":{"method":"GET","transformRequest":[null],"transformResponse":[null],"url":"http://10.0.1.19:8080/fhir/baseDstu3/StructureDefinition?kind=logical&identifier=http://clinfhir.com|author&_count=100","headers":{"Accept":"application/json, text/plain, /"}},"statusText":""}
previous when i asked this question, you said CORS problem. so please can you tell me how to solve this issue?
Thank you.
David Hay (Apr 25 2017 at 17:37):
[CORS] (https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS) is a specification implemented by a server that allows a browser app hosted from a different domain to access it's resources (especially updating). If you look back through this stream there's a discussion on the exact headers needed, there were 3 from memory...
David Hay (Apr 25 2017 at 17:37):
Also this comment from @Brian Postlethwaite at the time: Hey Chuck, you might want to consider running some of the online test tools like ProjectCrucible.org, or the Aegis touchstone test tools.
They should be able to assist with testing server creates of resources really well.
David Hay (Apr 25 2017 at 17:42):
in addition you could check out the ones that the test servers - like HAPI - are returning... Access-Control-Allow-Origin:*
Access-Control-Expose-Headers:Location, Content-Location, but you alos need to repsond to an options request as well IIRC...
Last updated: Apr 12 2022 at 19:14 UTC