edwagbb commited on
Commit
4d2703c
·
1 Parent(s): 3fdfa53

Update proxy.py

Browse files
Files changed (1) hide show
  1. proxy.py +4 -4
proxy.py CHANGED
@@ -26,15 +26,15 @@ def proxy(scheme, url):
26
 
27
  return Response(generate(), status=resp.status_code, headers=headers)
28
 
29
- @app.route('/cf/<scheme>:/<path:url>', methods=['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'])
30
- def cf(scheme, url):
31
  req_method = request.method
32
  req_headers = {key: value for key, value in request.headers if key != 'Host'}
33
- req_headers['Referer'] = 'https://example.com/a?b=1&c=2'
34
  req_data = request.get_data()
35
 
36
  resp = scraper.request(method=req_method,
37
- url=f'https://f.openaimouj.uk/http/{scheme}://{url}',
38
  headers=req_headers,
39
  data=req_data,
40
  stream=True)
 
26
 
27
  return Response(generate(), status=resp.status_code, headers=headers)
28
 
29
+ @app.route('/<path:url>', methods=['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'])
30
+ def cf(url):
31
  req_method = request.method
32
  req_headers = {key: value for key, value in request.headers if key != 'Host'}
33
+ #req_headers['Referer'] = 'https://example.com/a?b=1&c=2'
34
  req_data = request.get_data()
35
 
36
  resp = scraper.request(method=req_method,
37
+ url=f'https://chat-shared3.zhile.io/{url}',
38
  headers=req_headers,
39
  data=req_data,
40
  stream=True)