LinuxForHealth / FHIR

The LinuxForHealth FHIR® Server and related projects

Home Page:https://linuxforhealth.github.io/FHIR

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Modifying config to allow PATCH interaction does not work

Washbear10 opened this issue · comments

Describe the bug
CORS preflight does never include PATCH in the Access-Control-Allow-Methods Header., even after editing server.xml with the element
<cors domain="/" allowedOrigins="*" allowedMethods="GET, DELETE, POST, PUT, HEAD, PATCH" allowedHeaders="*" maxAge="3600" />
nor after editing the fhir-server-config.json with the entries
"resources": { "open": true, "Patient": { } },
or
"resources": { "open": true, "Patient": { "interactions": ["create", "read", "vread", "history", "search", "update", "delete", "patch"] } },

Environment
Which version of LinuxForHealth FHIR Server?
I run the latest docker image ( Tag is ibmcom/ibm-fhir-server:4.11.1)
To Reproduce
Steps to reproduce the behavior:

  1. Install docker image
  2. populate FHIR server with a resource
  3. try to update it partially using HTTP PATCH > results in cors preflight error "Acess to fetch at 'https://localhost:9443/fhir-server/api/v4/Patient/187af6a6d4c-81fb9c96-96ef-4916-92b1-6fdf11bd41e2' from origin 'http://localhost:3001' has been blocked by CORS policy: Method PATCH is not allowed by Access-Control-Allow-Methods in preflight response."
  4. try again with mentioned fixes to config files (after restarting)

Expected behavior
PATCH should be included in CORS Access-Control-Allow-Methods Header

It does work now for some reason after restarting the container the 5th time.