# Safety net in case the app directory ends up inside public_html: never serve
# source, data or logs directly. Passenger handles the webhook route before
# Apache looks for files, so this does not affect the bot.

# One worker only. Conversation state and the persistence file have a single
# owner this way, and the bot is far too low-traffic to need more.
# If the domain starts returning HTTP 500, your host disallows these in
# .htaccess — delete this block, the bot still works without it.
<IfModule mod_passenger.c>
    PassengerMaxInstances 1
    PassengerMinInstances 1
</IfModule>

Options -Indexes

<FilesMatch "\.(py|pyc|json|txt|log|lock|sh|md|yaml|yml)$">
    Require all denied
</FilesMatch>

<FilesMatch "^\.">
    Require all denied
</FilesMatch>

RedirectMatch 404 /\.git
RedirectMatch 404 /data/
RedirectMatch 404 /__pycache__/
