Skip to content

Commit 07edf2a

Browse files
authored
docs(readme): add reverse proxy notes (#972)
1 parent d72b2c5 commit 07edf2a

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,34 @@ If you would like it to be hosted at e.g. hapi-fhir-jpaserver, e.g. http://local
485485
fhir_version: R4
486486
```
487487

488+
## Running behind a reverse proxy
489+
490+
When the starter is exposed through a reverse proxy or load balancer, configure the public FHIR base URL that clients
491+
should see in generated links, Bundle entries, and the web tester.
492+
493+
For a stable public URL, set `hapi.fhir.server_address` to the externally reachable FHIR endpoint:
494+
495+
```yaml
496+
hapi:
497+
fhir:
498+
server_address: https://fhir.example.com/fhir
499+
tester:
500+
home:
501+
server_address: https://fhir.example.com/fhir
502+
```
503+
504+
If your proxy forwards the original request host and scheme, enable the Apache proxy address strategy instead:
505+
506+
```yaml
507+
hapi:
508+
fhir:
509+
use_apache_address_strategy: true
510+
use_apache_address_strategy_https: true
511+
```
512+
513+
Ensure the proxy sends the usual forwarded headers, such as `X-Forwarded-Host`, `X-Forwarded-Proto`, and
514+
`X-Forwarded-Prefix` when the server is mounted below a path prefix.
515+
488516

489517
## Deploy with docker compose
490518

0 commit comments

Comments
 (0)