add hub-and-spoke diagrams to readme
This commit is contained in:
@ -6,7 +6,7 @@ from werkzeug.exceptions import abort
|
||||
|
||||
from capsulflask.db import get_model, my_exec_info_message
|
||||
|
||||
bp = Blueprint("hosts", __name__, url_prefix="/hosts")
|
||||
bp = Blueprint("hub", __name__, url_prefix="/hub")
|
||||
|
||||
def authorized_for_host(id):
|
||||
auth_header_value = request.headers.get('Authorization').replace("Bearer ", "")
|
||||
@ -17,6 +17,6 @@ def heartbeat(id):
|
||||
if authorized_for_host(id):
|
||||
get_model().host_heartbeat(id)
|
||||
else:
|
||||
current_app.logger.info(f"/hosts/heartbeat/{id} returned 401: invalid token")
|
||||
current_app.logger.info(f"/hub/heartbeat/{id} returned 401: invalid token")
|
||||
return abort(401, "invalid host id or token")
|
||||
|
||||
|
Reference in New Issue
Block a user