I'm trying to build a cors proxy through flask from scratch. Here's my code
def api_cors(name, method):
if method == 'http' or method == 'https':
r = request.urlopen(method+"://"+name)
return "method not set!"
If you want use the same URL scheme that you're using now, change your routing decorator to this and it will work.