1
0
Fork 0
mirror of https://github.com/docker/awesome-compose.git synced 2025-04-25 02:08:06 +02:00
Signed-off-by: Grant Birkinbine <grant.birkinbine@gmail.com>
This commit is contained in:
Grant Birkinbine 2021-04-06 03:54:06 -06:00 committed by GitHub
parent a42a8531ab
commit 4480b64e58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 313 additions and 0 deletions

View file

@ -0,0 +1,27 @@
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route('/')
def hello():
return "Hello World!"
@app.route('/cache-me')
def cache():
return "nginx will cache this response"
@app.route('/info')
def info():
resp = {
'connecting_ip': request.headers['X-Real-IP'],
'proxy_ip': request.headers['X-Forwarded-For'],
'host': request.headers['Host'],
'user-agent': request.headers['User-Agent']
}
return jsonify(resp)
@app.route('/flask-health-check')
def flask_health_check():
return "success"