This commit is contained in:
ilkeral
2025-07-21 13:49:36 +03:00
commit 342f1314c7
57 changed files with 9297 additions and 0 deletions

11
ssh_manager/middleware.py Normal file
View File

@ -0,0 +1,11 @@
from django.utils.deprecation import MiddlewareMixin
class SSHConnectionMiddleware(MiddlewareMixin):
_connection_checked = False # Sınıf değişkeni olarak tanımla
def process_request(self, request):
# Sadece bir kez çalıştır
if not SSHConnectionMiddleware._connection_checked:
from .apps import check_server_connection
check_server_connection()
SSHConnectionMiddleware._connection_checked = True