Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
UI accessed over reverse-proxy:
http://reverse-proxy-url:443/scdf/
Actual backend url:
http://somedomain.de:8080/scdf/
If you access _links the actual backend is rendering those as
http://somedomain.de:8080/scdf/tasks/logs/mytask?platformName=default&schemaTarget=boot2
This PR is going to exchange the protocol / host / port from the one of the reverse proxy so that it is going to look like this
http://reverse-proxy-url:443/scdf/tasks/logs/mytask?platformName=default&schemaTarget=boot2
So
somedomain.de
is replaced withreverse-proxy-url
,8080
is replaced with443
andhttp
withhttp
If the server does not run behind a reverse proxy nothing is going to be changed - for the tests I wrapped the url into a try catch as there is no protocol / domain / port present.
Edit: fixes: #1994