Alibrown commited on
Commit
0fd5085
·
verified ·
1 Parent(s): 60d645e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -2,10 +2,12 @@ from flask import Flask, request, Response, jsonify
2
  import requests
3
 
4
  app = Flask(__name__)
 
5
  app.logger.disabled = True
6
 
7
  @app.route('/')
8
  def show_ip():
 
9
  return jsonify({
10
  "status": "running",
11
  "proxy_config_url": request.url_root + "proxy.pac"
@@ -15,7 +17,7 @@ def show_ip():
15
  def proxy_pac():
16
  pac_content = """function FindProxyForURL(url, host) {
17
  return "PROXY %s:7860; DIRECT";
18
- }""" % request.host
19
 
20
  return Response(
21
  pac_content,
@@ -37,6 +39,7 @@ def proxy(url):
37
  return Response("Error", 500)
38
 
39
  if __name__ == "__main__":
 
40
  import logging
41
  log = logging.getLogger('werkzeug')
42
  log.disabled = True
 
2
  import requests
3
 
4
  app = Flask(__name__)
5
+ # Logging komplett deaktivieren
6
  app.logger.disabled = True
7
 
8
  @app.route('/')
9
  def show_ip():
10
+ # Minimale Antwort ohne Logging
11
  return jsonify({
12
  "status": "running",
13
  "proxy_config_url": request.url_root + "proxy.pac"
 
17
  def proxy_pac():
18
  pac_content = """function FindProxyForURL(url, host) {
19
  return "PROXY %s:7860; DIRECT";
20
+ }""" % request.host
21
 
22
  return Response(
23
  pac_content,
 
39
  return Response("Error", 500)
40
 
41
  if __name__ == "__main__":
42
+ # Werkzeug Logger auch deaktivieren
43
  import logging
44
  log = logging.getLogger('werkzeug')
45
  log.disabled = True