We have a load balancer set up that forwards requests to two apache web servers. Currently we set up an SSL certificate on the load balancer side, but the problem is that after the load balancer the requests are still forwarded as HTTP, and we use the request to generate absolute url's to our CSS and JS assets. (Implemented with java portlets)
So when a user enters over HTTPS he still has absolute links via HTTP, and therefore the styling breaks.
Basically we want to generate links depending on the request protocol, but we always get HTTP on our side. The problem is that our access to the load balancer is limited. (client has control)
Can anyone suggest some kind of solution that will help us determine the request type even if it's forwarded using plain HTTP? (Send headers to Apache from the load balancer?)