Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Commit

Permalink
Change standalone header when in mirroring mode (prevents client from…
Browse files Browse the repository at this point in the history
… sending basic auth headers and overwriting token)
  • Loading branch information
shin- committed May 27, 2014
1 parent ea6e568 commit 3faf029
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docker_registry/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@
@app.route('/_ping')
@app.route('/v1/_ping')
def ping():
return toolkit.response(headers={
'X-Docker-Registry-Standalone': cfg.standalone is not False
})
headers = {'X-Docker-Registry-Standalone': cfg.standalone is not False}
if cfg.mirroring:
headers['X-Docker-Registry-Standalone'] = 'mirror'
return toolkit.response(headers=headers)


@app.route('/')
Expand Down

0 comments on commit 3faf029

Please sign in to comment.