Avoid redirect loop if WordPress is behind a TLS proxy
Avoid redirect loop if WordPress is behind a TLS proxy

If WordPress is hosted behind a reverse proxy that provides SSL, but is
hosted itself without SSL, these options will initially send any
requests into an infinite redirect loop. To avoid this, we must
configure WordPress to recognize the HTTP_X_FORWARDED_PROTO header.

https://codex.wordpress.org/Administration_Over_SSL#Using_a_Reverse_Proxy

dokku-community/dokku-wordpress