DmitrMakeev commited on
Commit
675fc67
·
verified ·
1 Parent(s): 05f5679

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -202,10 +202,11 @@ def save_settings(settings_dict):
202
 
203
  @app.route('/load_settings', methods=['POST'])
204
  def get_settings():
 
 
 
 
205
  # Проверка IP-адреса клиента
206
- client_ip = request.remote_addr
207
- server_ip = get_ip_address()
208
- print(f"Client IP: {client_ip}, Server IP: {server_ip}") # Отладочная информация
209
  if client_ip != server_ip:
210
  return jsonify({"error": "Unauthorized access"}), 403
211
 
@@ -213,10 +214,11 @@ def get_settings():
213
 
214
  @app.route('/save_settings', methods=['POST'])
215
  def save_settings_route():
 
 
 
 
216
  # Проверка IP-адреса клиента
217
- client_ip = request.remote_addr
218
- server_ip = get_ip_address()
219
- print(f"Client IP: {client_ip}, Server IP: {server_ip}") # Отладочная информация
220
  if client_ip != server_ip:
221
  return jsonify({"error": "Unauthorized access"}), 403
222
 
 
202
 
203
  @app.route('/load_settings', methods=['POST'])
204
  def get_settings():
205
+ # Получаем IP-адрес клиента
206
+ client_ip = get_ip_address()
207
+ print(f"Полученный IP-адрес клиента: {client_ip}")
208
+
209
  # Проверка IP-адреса клиента
 
 
 
210
  if client_ip != server_ip:
211
  return jsonify({"error": "Unauthorized access"}), 403
212
 
 
214
 
215
  @app.route('/save_settings', methods=['POST'])
216
  def save_settings_route():
217
+ # Получаем IP-адрес клиента
218
+ client_ip = get_ip_address()
219
+ print(f"Полученный IP-адрес клиента: {client_ip}")
220
+
221
  # Проверка IP-адреса клиента
 
 
 
222
  if client_ip != server_ip:
223
  return jsonify({"error": "Unauthorized access"}), 403
224