How do I need to configure my site on AWS with Elastic Load Balancing to force HTTPS everywhere? my site is up and running, but all my form submits get redirected to an http:// link. The redirect from http to https on my Server (Apache on EC2) is configured and you don't see any effect as a user. If i create baseurls directly on the server it also returns http:// links. 

It causes troubles on the intern side:


Google Analytics can't track this redirects as the same user and sees every form submit as an new user from a direct source.
the redirect causes a delay for the user (mostly millisecs)


Config: 


running an Drupal 8.7.7 on an Apache Server.
http-redirect: 


    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteCond %{HTTP_USER_AGENT} !ELB-HealthChecker
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]



settings.php:


  $settings['reverse_proxy'] = TRUE;
  $settings['reverse_proxy_addresses'] = array($_SERVER['PROXY_ADDRESS']);

  $settings['reverse_proxy_trusted_headers'] = \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_AWS_ELB;


This config for setting.php was introduced in 8.7.0:
https://www.drupal.org/node/3030558

I really don't have any clue what to do now, since i tried like thousands of possibilities. 

Best Regards 
FirstSanny
Got it myself.

Configuration is absolutly correct, but i set the wrong reverse_proxy_adresses to be allowed. I thought, that i can use the beanstalk-url, but it worked perfectly fine with one of the internal IP Configs for AWS: 172.16.0.0/12