Closed holger-stenzhorn closed 1 year ago
@holger-stenzhorn I have implemented your suggestion slightly modified in #95. The DEV_DSF_SERVER_CONTEXT_PATH
variable does not need to be specified for the DSF FHIR app server if the apache httpd ProxyPass
and ProxyPassReverse
directives stay hard coded to the DSF FHIR app server context path default .../fhir
...
The given solution works nicely but there is a tiny "edge case": If you enter e.g. https://diz.uks.eu/dsf/test/fhir
then this gets redirected to https://diz.uks.eu/fhir
. A quick and easy fix for this issue would be to change host-ssl.conf
accordingly:
+Redirect ${SERVER_CONTEXT_PATH} ${SERVER_CONTEXT_PATH}/
-<Location "${SERVER_CONTEXT_PATH}">
+<Location "${SERVER_CONTEXT_PATH}/">
RequestHeader set X-ClientCert %{SSL_CLIENT_CERT}s
- ProxyPass http://${APP_SERVER_IP}:8080/fhir timeout=${PROXY_PASS_TIMEOUT_HTTP} connectiontimeout=${PROXY_PASS_CONNECTION_TIMEOUT_HTTP}
- ProxyPassReverse http://${APP_SERVER_IP}:8080/fhir
+ ProxyPass http://${APP_SERVER_IP}:8080/fhir/ timeout=${PROXY_PASS_TIMEOUT_HTTP} connectiontimeout=${PROXY_PASS_CONNECTION_TIMEOUT_HTTP}
+ ProxyPassReverse http://${APP_SERVER_IP}:8080/fhir/
The context path of the FHIR proxy server is currently hardcoded to
/fhir
. To render this customizable, only a few changes need to be performed:APP_SERVER_CONTEXT_PATH
and default it to/fhir
indsf-docker/fhir_proxy/Dockerfile
:Replace the hardcoded context path
/fhir
indsf-docker/fhir_proxy/conf/extra/host-ssl.conf
with that environment variable:docker-compose.yml
: (Note that the environment variableDEV_DSF_SERVER_CONTEXT_PATH
already exists indsf-fhir/dsf-fhir-server-jetty/docker/Dockerfile
)The above has been implemented and successfully tested in our local environment already.
⚠️ There just seems to be a tiny bug though in
dsf-fhir/dsf-fhir-server/src/main/java/dev/dsf/fhir/adapter/HtmlFhirAdapter.java
inprivate String getUrlHeading(Resource resource)
which leads to a a double display of/fhir
in the shown title, e.g.https://diz.uks.eu/dsf/fhir/fhir/metadata
and - if I am not mistaken - there should be ahtml
tab left to thejson
andxml
tabs. (see screenshot)