Skip to content

Commit fdf4fcc

Browse files
author
patched.codes[bot]
committed
Patched main.py
1 parent 9e553e4 commit fdf4fcc

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

main.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from django.http import JsonResponse
2+
from django.views import View
13
import requests
24
import subprocess
35

@@ -8,8 +10,8 @@
810
sessions.SessionRedirectMixin.resolve_redirects()
911
session = requests.Session()
1012
proxies = {
11-
'http': 'http://test:pass@localhost:8080',
12-
'https': 'http://test:pass@localhost:8090',
13+
'http': 'http://test:pass@localhost:8080',
14+
'https': 'http://test:pass@localhost:8090',
1315
}
1416
url = 'http://example.com' # Replace with a valid URL
1517
req = requests.Request('GET', url)
@@ -21,4 +23,9 @@
2123
command = "ping " + user_input
2224
subprocess.call(command, shell=True)
2325

24-
print("Command executed!")
26+
print("Command executed!")
27+
28+
class HealthView(View):
29+
def get(self, request, *args, **kwargs):
30+
return JsonResponse({'message': 'ok'})
31+

0 commit comments

Comments
 (0)