Skip to content

Revisit Generation of Absolute URL's #305

@alexanderkiel

Description

@alexanderkiel

Currently we have both the TORCH_BASE_URL as static configuration of the base URL of TORCH to use while generating absolute URL's like the status URL of the async request and the request.uriBuilder() used in FhirController which returns an URI builder with the absolute URL of the request.

The static config of TORCH_BASE_URL isn't useful in tests where the port of the TORCH container is random. Here we would need to pass the actual port at runtime via headers like X-Forwarded-Host. However the request's URI builder will do it already because the we talk directly with the TORCH container and so it can see the absolute URL we use to call [base]/fhir/$extract-data. But this will not work behind a reverse proxy. Spring suggest to use ForwardedHeaderFilter to take headers like X-Forwarded-Host into account.

The current usage of the TORCH_BASE_URL is the ResultFileManager, which will generate the absolute URL of the [base]/fhir/$extract-data request. because the ResultFileManager has no access the the original HTTP request calling [base]/fhir/$extract-data we have to transfer that information from the request to the ResultFileManager somehow. I would suggest to use an actual Job class for that.

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions