main: Stripe log all requests
This commit is contained in:
parent
5f56c1d0c2
commit
d4fd470564
@ -235,6 +235,10 @@ def tlsa():
|
|||||||
|
|
||||||
@app.route('/stripe', methods=['POST'])
|
@app.route('/stripe', methods=['POST'])
|
||||||
def stripe():
|
def stripe():
|
||||||
|
# Log all requests
|
||||||
|
print(request.json)
|
||||||
|
# Log for docker
|
||||||
|
print(request.json, flush=True)
|
||||||
# Get API header
|
# Get API header
|
||||||
api_key = request.headers.get('key')
|
api_key = request.headers.get('key')
|
||||||
if api_key == None:
|
if api_key == None:
|
||||||
@ -242,10 +246,7 @@ def stripe():
|
|||||||
if api_key != os.getenv('STRIPE_KEY'):
|
if api_key != os.getenv('STRIPE_KEY'):
|
||||||
return jsonify({'error': 'Invalid API key', 'success': 'false'})
|
return jsonify({'error': 'Invalid API key', 'success': 'false'})
|
||||||
|
|
||||||
# Log all requests
|
|
||||||
print(request.json)
|
|
||||||
# Log for docker
|
|
||||||
print(request.json, flush=True)
|
|
||||||
|
|
||||||
return jsonify({'success': 'true'})
|
return jsonify({'success': 'true'})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user