This constant makes WordPress send every login and admin request over HTTPS, so passwords and cookies never travel in plain text.
define( 'FORCE_SSL_ADMIN', true );
With it on, wp-login.php and /wp-admin/ redirect to HTTPS, and the login cookie is set as secure. Worth knowing: when you don’t define it, current WordPress sets it to true by itself if your siteurl starts with https. So on a site that is fully HTTPS, defining it mostly makes the intent visible in the config.
The catch is a reverse proxy that handles TLS, like nginx, Caddy or Traefik in front of a WordPress container. WordPress then sees plain HTTP from the proxy, thinks the request is insecure, and redirects again. That is an endless loop. WordPress decides via $_SERVER['HTTPS'], so the documented fix tells it about the header the proxy sends:
if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && strpos( $_SERVER['HTTP_X_FORWARDED_PROTO'], 'https' ) !== false ) {
$_SERVER['HTTPS'] = 'on';
}
I’d put it above the “stop editing” line. Only do this when your proxy really sets that header and nobody can reach WordPress around the proxy, because otherwise a client could send the header itself.
Further reading: HTTPS for WordPress, wp-config: Require SSL for admin and logins