I have a Spring Boot application with Spring Data Rest which I'm deploying via jar file with embedded Tomcat. The application runs on port 8080 but in front of Tomcat there's an httpd which passes the request through. Now the application comes with HATEOAS links, which I'm using in my JS-Client. The response looks something like this:
{
"property" : "value"
"_links" : {
"self" : {
"href" : "http://my.server:8080/resource/1"
}
}
}
My problem is that since I access the application via my.server, the application responds with an href to my.server:8080, which isn't accessible from the outside. How can I change the href hostname to my.server (without the port) without letting tomcat run under port 80? I tried subclassing RepositoryRestMvcConfiguration and setting the baseURI, but that does not work, since I get a 404 then.