Created
November 30, 2016 01:22
-
-
Save tomplex/810b2b47a952ada60cc2915fb3f70bd5 to your computer and use it in GitHub Desktop.
flask app to mirror url
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 | |
import requests | |
app = Flask(__name__) | |
@app.route('/mirror-url/<url>') | |
def mirror(url): | |
r = requests.get('http://' + url) | |
return r.content | |
if __name__ == '__main__': | |
app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment