In our production environment the SSL is offloaded to the load balancer. This was done to reduce the CPU load on the servers.
For the most part this is perfectly fine, however, we now need the servers to be aware whether they are serving pages over SSL or not.
What is a good way of doing this, but keeping the SSL offload in place?
You could add a header sent to the backend server containing the scheme
For example, using NGINX I'd send a header to the backend proxy server with the $scheme variable,
Then in your backend application you could get the header;
What load balancer are you using? I'm sure there will be a way to do something similar in most software, I just happen to know NGINX best