So, I added it to the htaccess, but the output stays the same. Just sharing my whole .htaccess file for your reference:
flaskTEST/.htaccess
RewriteEngine On
RewriteBase /
RewriteRule ^(flasktest\.wsgi/.*)$ - [L]
RewriteRule ^(.*)$ flaskTEST/flasktest.wsgi/$1 [QSA,PT,L]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
The directory I use is flaskTEST and the WSGI file is flaskTEST.wsgi
An interesting thing I noted is that the .htaccess rule made the header reachable to a PHP script, but not the WSGI.
The PHP script is this:
<?php
$headers = apache_request_headers();
echo '<!DOCTYPE html><html><head><meta charset="utf-8"><title>test headers</title></head><body><ul>';
echo "\n\n";
foreach ($headers as $header => $value) {
echo "<li>$header: $value </li>\n";
}
echo "</ul>\n";
echo '</body></html>';
That script outputted the Authorization header:
<!DOCTYPE html><html><head><meta charset="utf-8"><title>test headers</title></head><body><ul>
<li>Another: header </li>
<li>Accept: */* </li>
<li>User-Agent: curl/8.0.1 </li>
<li>Authorization: Basic c2FtcGxlOmhlYWRlcg== </li>
<li>Host: amsdc.helioho.st </li>
<li>Content-Length: </li>
<li>Content-Type: </li>
</ul>
</body></html>