edwagbb commited on
Commit
90c18d5
·
1 Parent(s): 4d2703c

Update proxy.py

Browse files
Files changed (1) hide show
  1. proxy.py +2 -2
proxy.py CHANGED
@@ -26,11 +26,11 @@ def proxy(scheme, url):
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,
 
26
 
27
  return Response(generate(), status=resp.status_code, headers=headers)
28
 
29
+ @app.route('/', methods=['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'])
30
  @app.route('/<path:url>', methods=['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'])
31
+ def cf(url=""):
32
  req_method = request.method
33
  req_headers = {key: value for key, value in request.headers if key != 'Host'}
 
34
  req_data = request.get_data()
35
 
36
  resp = scraper.request(method=req_method,