class Proxy::ContainerGateway::Api

Private Instance Methods

auth_header() click to toggle source
# File lib/smart_proxy_container_gateway/container_gateway_api.rb, line 115
def auth_header
  AuthorizationHeader.new(request.env['HTTP_AUTHORIZATION'])
end
redirect_authorization_headers() click to toggle source
# File lib/smart_proxy_container_gateway/container_gateway_api.rb, line 108
def redirect_authorization_headers
  response.headers['Docker-Distribution-API-Version'] = 'registry/2.0'
  response.headers['Www-Authenticate'] = "Bearer realm=\"https://#{request.host}/v2/token\"," \
                                         "service=\"#{request.host}\"," \
                                         "scope=\"repository:registry:pull,push\""
end