forked from hesabix/arc
Remove the production bot token from example configs, disable public proxy test endpoints, restrict proxied Bot API methods, and mask notification secrets in the admin API after the @Hesabix_bot compromise. Co-authored-by: Cursor <cursoragent@cursor.com>
33 lines
1.3 KiB
ApacheConf
Executable file
33 lines
1.3 KiB
ApacheConf
Executable file
# تنظیمات پروکسی تلگرام برای cPanel
|
|
# این فایل باید در root domain شما قرار بگیرد (همان جایی که index.php است)
|
|
|
|
RewriteEngine On
|
|
|
|
# مسدود کردن صفحات تست/دیباگ عمومی (حتی اگر فایل روی دیسک مانده باشد)
|
|
RewriteRule ^(test_webhook|set_webhook_test|test_connection)\.php$ - [F,L,NC]
|
|
RewriteRule ^CONFIG_FIXED_EXAMPLE\.php$ - [F,L,NC]
|
|
RewriteRule ^config\.example\.php$ - [F,L,NC]
|
|
|
|
# هدایت مسیر /telegram/webhook به index.php
|
|
RewriteCond %{REQUEST_URI} ^/telegram/webhook$ [NC]
|
|
RewriteCond %{REQUEST_METHOD} POST [NC]
|
|
RewriteRule ^(.*)$ index.php [QSA,L]
|
|
|
|
# هدایت مسیر /telegram/send به index.php
|
|
RewriteCond %{REQUEST_URI} ^/telegram/send$ [NC]
|
|
RewriteCond %{REQUEST_METHOD} POST [NC]
|
|
RewriteRule ^(.*)$ index.php [QSA,L]
|
|
|
|
# هدایت مسیر /health به index.php
|
|
RewriteCond %{REQUEST_URI} ^/health$ [NC]
|
|
RewriteCond %{REQUEST_METHOD} GET [NC]
|
|
RewriteRule ^(.*)$ index.php [QSA,L]
|
|
|
|
# هدایت مسیر /telegram/webhook/status به index.php
|
|
RewriteCond %{REQUEST_URI} ^/telegram/webhook/status$ [NC]
|
|
RewriteCond %{REQUEST_METHOD} GET [NC]
|
|
RewriteRule ^(.*)$ index.php [QSA,L]
|
|
|
|
# اطمینان از اینکه index.php در دسترس است
|
|
DirectoryIndex index.php
|
|
|