Created
February 25, 2015 05:49
-
-
Save rchowe/5675ada35157122f98a5 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python | |
from flask import Flask, request | |
app = Flask(__name__) | |
@app.route('/') | |
def home(): | |
return 'Hello, world!\n' | |
@app.route('/sslinfo') | |
def sslinfo(): | |
return """I know the following things about the certificate you provided: | |
Host: {} | |
X-SSL-Verified: {} | |
X-SSL-DN: {} | |
X-SSL-Client-Cert: {} | |
""".format( | |
request.headers.get('Host'), | |
request.headers.get('X-SSL-Verified'), | |
request.headers.get('X-SSL-DN'), | |
request.headers.get('X-SSL-Client-Cert')) | |
if __name__ == '__main__': | |
app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment