Issues overriding domain name
spanishkangaroo opened this issue · 2 comments
Our services are always behind a proxy, so we had a problem within the links section, as it was showing reference to the original hostname, not the proxy. E.g.
"links": {
"self": "https://backend-server-instead-of-proxy.com/waste/entity/57ACE9FD-D796-B6BE-3B5C-B0311AD555A7/relationships/entityType",
"related": "https://backend-server-instead-of-proxy.com/waste/entity/57ACE9FD-D796-B6BE-3B5C-B0311AD555A7/entityType"
}
We tried to solve by using the following property
crnk.config.core.resource.domain
as per the official documentation, but it did not work, the URLs where still showing the backend hostname.
Finally, after some debugging, we managed to make it show proxy URLs by defining the property
crnk.domain-name=https://proxy-hostname.com
but it looks like a dirty hack.
Is this the expected behaviour? Are we missing something?
We are just using the latest version of the crnk spring boot 2 library.
if the proxy properly forwards host and x-forward-proto headers, no configuration should be necessary.
Thank you, we will check the header forwards and keep this issue updated.