-
Notifications
You must be signed in to change notification settings - Fork 979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port is double reported when using Apache Strategy #258
Comments
I ran into the same situation as well, but this isn't a recent change but a bug in either your proxy server or the ApacheAddressStrategy implementation (whichever you prefer). It occurs because the proxy sets I faced this when using https://github.com/chimurai/http-proxy-middleware to forward requests via NodeJS to a FHIR server and worked around it by removing the |
Hi @chgl The proxy server is unchangeable (nginx ingress on kubernetes) and works fine with all other application in the cluster. |
I tend to agree. I think a better place for the issue would then be https://github.com/hapifhir/hapi-fhir. I guess the fix would be if the Maybe the apache strategy (or a new one?) should also support the more standardized https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded header - where the above mentioned issue won't be a concern since there's only one place where a port may be used. |
I can confirm the issue using Traefik as reverse proxy, too. |
This issue is stale because it has been open 730 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
When setting the apache address strategy to X-Forward the bundles (next parameter) get returned with twice the port.
hapi:
fhir:
### This is the FHIR version. Choose between, DSTU2, DSTU3, R4 or R5
fhir_version: R5
### enable to use the ApacheProxyAddressStrategy which uses X-Forwarded-* headers
### to determine the FHIR server address
use_apache_address_strategy: true
### forces the use of the https:// protocol for the returned server address.
### alternatively, it may be set using the X-Forwarded-Proto header.
use_apache_address_strategy_https: true
Here a small request chain to visualize what happens:
REQ
curl --location --request GET 'https://fhir-dev.iatros.dev/fhir/Observation'
RESP
Using the searchset url from next
REQ
curl --location --request GET 'https://fhir-dev.iatros.dev:443/fhir?_getpages=d581a147-de74-49d0-8dae-8b7dd76038dd&_getpagesoffset=500&_count=500&_pretty=true&_bundletype=searchset'
RESP
This behavior occurred after upgrading from 5.5.-PRE2 to 5.5-PRE7, somewhere in between it might got broken.
Due to lack of time I can't debug further at this point, sorry for that
The text was updated successfully, but these errors were encountered: