bluehalo / node-fhir-server-core

An Open Source secure REST implementation for the HL7 FHIR Specification. For API documentation, please see https://github.com/Asymmetrik/node-fhir-server-core/wiki.
https://asymmetrik.com/healthcare
MIT License
391 stars 119 forks source link

App does not function when placed behind a basePath like api.mysite.com/fhir #267

Closed bfla closed 2 years ago

bfla commented 3 years ago

Do you want to request a feature, report a bug, or improve documentation?

Report a bug.

If you are reporting a bug?

What is the current behavior? For production, I need to run the API behind a load balancer at a path like https://api.mysite.com/fhir. It does not work because the app receives the path /fhir in the URL, which does not correspond to a profile. So it responds with an error: Invalid url: /fhir/<PATH>.

Currently, the only workaround I know of is to fork the library and make changes to the express server. I may be able to make a pull request with a solution if you think you have time to review/merge it.

What is the expected behavior?

What are the steps to reproduce? Add a path like /fhir to the baseUrl.

What OS are you using and what version of node.js and @asymmetrik/node-fhir-server-core are you running?

luan-dev commented 3 years ago

I believe the team has the issue on the back burner for a while. However, there is no quick fix. I'll gladly take a look at a PR if needed

luan-dev commented 2 years ago

It looks like this commit introduced this feature: https://github.com/Asymmetrik/node-fhir-server-core/commit/e24226850b7e87f63a2346036109c9f9d410ef6b