Integrate flask-principal in order to provide RBAC.
This commit is contained in:
parent
8e169b1026
commit
458b69953a
8 changed files with 237 additions and 103 deletions
7
app.py
7
app.py
|
@ -1,10 +1,13 @@
|
|||
from flask import Flask, make_response, jsonify
|
||||
from flask.ext.principal import Principal
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
Principal(app, use_sessions=False)
|
||||
|
||||
@app.route('/_ping')
|
||||
@app.route('/v1/_ping')
|
||||
def ping():
|
||||
response = make_response('true', 200);
|
||||
response = make_response('true', 200)
|
||||
response.headers['X-Docker-Registry-Version'] = '0.6.0'
|
||||
return response
|
||||
return response
|
||||
|
|
Reference in a new issue