Skip to content

Instantly share code, notes, and snippets.

@lukestanley
Created November 29, 2022 11:11
Show Gist options
  • Save lukestanley/5cca3049a539d34056c6a03298ffe626 to your computer and use it in GitHub Desktop.
Save lukestanley/5cca3049a539d34056c6a03298ffe626 to your computer and use it in GitHub Desktop.
A Flask server to echo HTTP request headers as JSON to investigate issues with a CORS proxy
# A Flask server to echo HTTP request headers as JSON to investigate issues with a CORS proxy.
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route('/')
def index():
return jsonify(dict(request.headers))
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8548)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment