-
Notifications
You must be signed in to change notification settings - Fork 157
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
Generated selfs links on top level does not respect ServiceUrlProvider #789
Comments
Thanks for @pekka-ia providing a solution for this issue! Here's hoping the proposed solution fits to the project's goals. |
Thanks @pekka-ia looks good! Hopefully the request will be approved soon! |
I realized there is actually a tricky thing with ServiceUrlProvider and the reactive projects - basically ServiceUrlProvider is attempting to access HttpRequestContext through thread context (HttpRequestContextProvider#33-38) which is not available in reactive settings. I'll see if I can make this be compatible with both contexts. |
Looks like on the resource links side this base URL building is done like so: I'll see if I can introduce similar logic here. |
I think I have a solid fix now. Instead of attempting to use ServiceUrlProvider, using When the below config is applied:
then
With an explicit domain set, it looks like this:
and with no domain-name configuration set at all, it still works as expected
|
@pekka-ia, excellent! |
The self link which is generated in DocumentMapper (line 146-148) does not take the ServiceUrlProvider in advance. So the resulting link uses the host and path from the request URI. Which could lead to wrong links when the system is behind a proxy / load balancer etc.
The text was updated successfully, but these errors were encountered: