Created
November 29, 2022 11:11
-
-
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
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
# 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