Redirect loop between /umbraco and /umbraco/oauth-completed

After upgrading to v17 I cannot login into the backoffice because I experience a redirect loop. This wasn’t an issue with v16.

This happens only in the production environment, where the website runs as a Docker image. Locally it functions as expected.

It’s possibly a HTTPS issue