Alibrown commited on
Commit
3a31d83
·
verified ·
1 Parent(s): 7b302ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
app.py CHANGED
@@ -1,15 +1,14 @@
1
  from flask import Flask, request, Response, jsonify
2
- import logging
3
 
4
  app = Flask(__name__)
5
- logging.basicConfig(level=logging.INFO)
 
6
 
7
  @app.route('/')
8
  def show_ip():
9
- client_ip = request.headers.get('X-Forwarded-For', request.remote_addr)
10
- logging.info(f"Zugriff von IP: {client_ip}")
11
  return jsonify({
12
- "your_ip": client_ip,
13
  "proxy_config_url": request.url_root + "proxy.pac"
14
  })
15
 
@@ -25,4 +24,9 @@ def proxy_pac():
25
  )
26
 
27
  if __name__ == "__main__":
 
 
 
 
 
28
  app.run(host="0.0.0.0", port=7860)
 
1
  from flask import Flask, request, Response, jsonify
 
2
 
3
  app = Flask(__name__)
4
+ # Logging komplett deaktivieren
5
+ app.logger.disabled = True
6
 
7
  @app.route('/')
8
  def show_ip():
9
+ # Minimale Antwort ohne Logging
 
10
  return jsonify({
11
+ "status": "running",
12
  "proxy_config_url": request.url_root + "proxy.pac"
13
  })
14
 
 
24
  )
25
 
26
  if __name__ == "__main__":
27
+ # Werkzeug Logger auch deaktivieren
28
+ import logging
29
+ log = logging.getLogger('werkzeug')
30
+ log.disabled = True
31
+
32
  app.run(host="0.0.0.0", port=7860)