Created
March 14, 2018 22:36
-
-
Save Zwork101/c847554ea6c244c8faad97a619becf3a to your computer and use it in GitHub Desktop.
the whole proxy file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
from requests import get | |
app = Flask(__name__) | |
SITE_NAME = 'https://google.com/' | |
@app.route('/', defaults={'path': ''}) | |
@app.route('/<path:path>') | |
def proxy(path): | |
return get(f'{SITE_NAME}{path}').content | |
if __name__ == '__main__': | |
app.run(host='0.0.0.0', port=8080) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment