following situation: On the server is a apache and Varnish for caching. SSL is handled by an amazon load balancer. If the page is requested using https, the http header "X-Forwarded-Proto" is set to "https". The pages are sometimes different (e.g. links/images have to be fetched using https when using a secure connection)
How can I tell varnish that pages are different if the X-Forwarded-Proto header differs? As it is now, whatever is accessed first is cached and served for http and https!