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

Commit 67ecdd0

Browse files
author
Matthew Fisher
committed
add basic auth for all incoming requests
1 parent f764414 commit 67ecdd0

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

contrib/nginx.conf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,13 @@ server {
3333
location @my_411_error {
3434
chunkin_resume;
3535
}
36-
36+
3737
location / {
38-
proxy_pass http://docker-registry;
38+
proxy_pass http://docker-registry;
39+
proxy_set_header Host $host;
40+
proxy_read_timeout 900;
41+
42+
auth_basic "Restricted";
43+
auth_basic_user_file docker-registry.htpasswd;
3944
}
4045
}

contrib/nginx_1-3-9.conf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@ server {
2727

2828
# required to avoid HTTP 411: see Issue #1486 (https://github.com/dotcloud/docker/issues/1486)
2929
chunked_transfer_encoding on;
30-
30+
3131
location / {
32-
proxy_pass http://docker-registry;
32+
proxy_pass http://docker-registry;
33+
proxy_set_header Host $host;
34+
proxy_read_timeout 900;
35+
36+
auth_basic "Restricted";
37+
auth_basic_user_file docker-registry.htpasswd;
3338
}
3439
}

0 commit comments

Comments
 (0)