Drupal 8 error "redirected you too many times" while running behind reverse proxy

Hi,

I have installed a D8 site and tested it locally and it is running okay. However, we need it to be accessed via HTTPS and it to run behind a reverse proxy (rather than have a specific certificate for the site). When accessed through the browser, an error occurs “redirected you too many times”.

This is funny because the same site can run a Drupal 7 site via https without a problem. I have also configured the trusted hosts settings to allow the specific domain (say mysite.example.org)

$settings['trusted_host_patterns'] = array(
'^localhost$',
'^10.10.10.5$',
'^.mysite.example.org',
); 

Is there any setting in D8 that needs to be changed to allow this to run? Usually in D7 nothing needs to be changed for it to work.

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/1/feed