Sebastiaan van Stijn
3f19902eae
Config-file: remove User-Agent from config.json when saving
The config.json allows for setting custom HTTP headers, but given that
User-Agent is not customizable, we should remove it from the config before saving;
Before this change;
$ cat ~/.docker/config.json
{
"auths": {
"https://index.docker.io/v1/": {
"auth": "<base64 auth>"
}
},
"HttpHeaders": {
"User-Agent": "Docker-Client/19.03.12 (linux)"
}
}
$ docker logout
{
"auths": {},
"HttpHeaders": {
"User-Agent": "Docker-Client/19.03.12 (linux)"
}
}
After this change:
$ cat ~/.docker/config.json
{
"auths": {
"https://index.docker.io/v1/": {
"auth": "<base64 auth>"
}
},
"HttpHeaders": {
"User-Agent": "Docker-Client/19.03.12 (linux)"
}
}
$ docker logout
Removing login credentials for https://index.docker.io/v1/
$ cat ~/.docker/config.json
{
"auths": {}
}
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-01 15:04:39 +02:00
..
2020-09-29 17:24:07 +02:00
2020-09-10 14:59:02 +02:00
2020-10-01 15:04:39 +02:00
2020-05-28 20:08:35 +00:00
2020-08-28 15:35:42 +02:00
2017-09-01 19:41:06 -04:00
2020-02-23 00:28:55 +01:00
2020-02-23 00:28:55 +01:00
2020-03-24 23:42:33 +08:00
2020-04-22 17:16:13 +02:00
2020-02-23 00:28:55 +01:00
2019-01-29 11:26:40 +00:00
2017-05-15 18:03:03 -04:00
2020-02-23 00:28:55 +01:00
2020-04-22 17:16:13 +02:00
2017-04-17 17:40:59 -04:00
2020-05-07 14:25:59 +02:00
2019-10-31 19:22:22 +01:00