docker
This commit is contained in:
@@ -4,8 +4,8 @@ from http.server import BaseHTTPRequestHandler, HTTPServer
|
||||
|
||||
class RequestHandler(BaseHTTPRequestHandler):
|
||||
def do_GET(self):
|
||||
# Kök dizin (/) veya /config.json isteklerinde JSON dönüyoruz
|
||||
if self.path in ['/', '/config.json', '/api']:
|
||||
# Kök dizin (/) veya /islamic.json isteklerinde JSON dönüyoruz
|
||||
if self.path in ['/', '/islamic.json', '/api']:
|
||||
self.send_response(200)
|
||||
self.send_header('Content-Type', 'application/json; charset=utf-8')
|
||||
# CORS ayarları (Uygulamalardan sorunsuz erişim için)
|
||||
@@ -15,7 +15,7 @@ class RequestHandler(BaseHTTPRequestHandler):
|
||||
self.end_headers()
|
||||
|
||||
try:
|
||||
with open('config.json', 'r', encoding='utf-8') as f:
|
||||
with open('islamic.json', 'r', encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
self.wfile.write(content.encode('utf-8'))
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user