mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-04-28 07:59:55 +03:00
[Credentials] Add credentials feature
This commit is contained in:
parent
f92c5ceced
commit
cf2db37e3a
3 changed files with 19 additions and 2 deletions
17
README.md
17
README.md
|
@ -16,6 +16,7 @@ This web user interface use [Riot](https://github.com/Riot/riot) the react-like
|
|||
* List all tags for a repository/image
|
||||
* Sort the tag list
|
||||
* One interface for many registry
|
||||
* Use a secured docker registry
|
||||
|
||||
## Getting Started
|
||||
### Basic
|
||||
|
@ -60,3 +61,19 @@ To run the docker and see the website on your 8080 port, try this :
|
|||
```sh
|
||||
docker run -d -p 8080:8080 joxit/docker-registry-ui
|
||||
```
|
||||
|
||||
## Using CORS
|
||||
|
||||
Your server should be configured to accept CORS.
|
||||
|
||||
If your docker registry does not need credentials, you will need to send this HEADER :
|
||||
```
|
||||
Access-Control-Allow-Origin: '*'
|
||||
```
|
||||
|
||||
If your docker registry need credentials, you will need to send these HEADERS :
|
||||
```
|
||||
Access-Control-Allow-Origin: '<your docker-registry-ui url>'
|
||||
Access-Control-Allow-Credentials: true
|
||||
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS'] # Optional
|
||||
```
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
registryUI.catalog.instance.update();
|
||||
});
|
||||
oReq.open('GET', registryUI.url() + '/v2/_catalog');
|
||||
oReq.withCredentials = false;
|
||||
oReq.withCredentials = true;
|
||||
oReq.send();
|
||||
};
|
||||
this.on('updated', function () {
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
registryUI.taglist.instance.update();
|
||||
});
|
||||
oReq.open('GET', registryUI.url() + '/v2/' + name + '/tags/list');
|
||||
oReq.withCredentials = false;
|
||||
oReq.withCredentials = true;
|
||||
oReq.send();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue