Created
March 15, 2018 01:35
-
-
Save Zwork101/9505dd41e04b3f9ddd89acffffe1337b to your computer and use it in GitHub Desktop.
Fixed proxy
This file contains 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('__main__') | |
SITE_NAME = 'https://google.com/' | |
@app.route('/', defaults={'path': ''}) | |
@app.route('/<path:path>') | |
def proxy(path): | |
return get(f'{SITE_NAME}{path}').content | |
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