# FireWin777 api/.htaccess — upload to public_html/api/ and rename to .htaccess
# (this file is delivered as htaccess-api-new so the download does not
# collide with the live .htaccess).
<FilesMatch "^(config\.php|config\.example\.php)$">
  Require all denied
</FilesMatch>
Options -Indexes
# PHP-FPM / Apache drops the Authorization header by default, so the
# `Authorization: Bearer <token>` the browser sends never reached PHP:
# ws_auth_user() saw no header and answered 'Not signed in.', the front
# cleared the stored token on refresh, and the user was logged out on
# every refresh even though login had just worked. Pass it through.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [E=HTTP_AUTHORIZATION:%1]
</IfModule>
<IfModule mod_setenvif.c>
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
</IfModule>
