This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/endpoints/v1/__init__.py

33 lines
856 B
Python
Raw Normal View History

2015-06-22 21:37:13 +00:00
from flask import Blueprint, make_response
from app import metric_queue
2015-06-22 21:37:13 +00:00
from endpoints.decorators import anon_protect, anon_allowed
from util.metrics.metricqueue import time_blueprint
2015-06-22 21:37:13 +00:00
v1_bp = Blueprint('v1', __name__)
time_blueprint(v1_bp, metric_queue)
2015-06-22 21:37:13 +00:00
2015-06-22 21:37:13 +00:00
# Note: This is *not* part of the Docker index spec. This is here for our own health check,
# since we have nginx handle the _ping below.
@v1_bp.route('/_internal_ping')
@anon_allowed
def internal_ping():
return make_response('true', 200)
@v1_bp.route('/_ping')
@anon_allowed
def ping():
# NOTE: any changes made here must also be reflected in the nginx config
response = make_response('true', 200)
response.headers['X-Docker-Registry-Version'] = '0.6.0'
response.headers['X-Docker-Registry-Standalone'] = '0'
return response
from endpoints.v1 import (
index,
registry,
2017-06-29 17:24:00 +00:00
tag,)