I have a Spring Security Servlet Filter, I want to create a complete HATEOAS Link to it. Here is the result of my attempts (login). As you can see the protocol and host are missing. In production I need the protocol and host to be correctly handled (I've set server.use-forward-headers=true
so that should be fine for everything if I use the right source)
"_links" : {
"self" : {
"href" : "http://localhost/v0/public"
},
"registration" : {
"href" : "http://localhost/v0/public/registration"
},
"login" : {
"href" : "/v0/public/authentication/password"
}
I've tried this and writing my own builder, but they've both resulted in the above
new Link( "/v0/public/authentication/password", "login" )
How can I have this link created with all of the same info as the others.