Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.

Commit a22c14c

Browse files
authored
Added user-agent header to Doppler provider (#22)
1 parent 0d59c21 commit a22c14c

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3-
## 0.1.0 (March 18, 2022)
3+
## 0.0.2 (March 24, 2022)
44

55
- Initial release
6+
7+
## 0.0.3 (April 27, 2022)
8+
9+
- Added `user-agent` header to Doppler provider

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# GitOps Secrets for Node.js
1+
# GitOps Secrets
22

33
Hello, GitOps Secrets! Goodbye environment variable storage limits.
44

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gitops-secrets",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
44
"author": "Ryan Blunden <ryan.blunden@doppler.com>",
55
"description": "Securely bundle encrypted secrets into your deployments and safely decrypt at runtime.",
66
"repository": {
@@ -44,7 +44,8 @@
4444
"test": "jest",
4545
"lint": "eslint ./src ./tests",
4646
"prettier": "prettier --write .",
47-
"prettier-check": "prettier --check ."
47+
"prettier-check": "prettier --check .",
48+
"prepublishOnly": "sed -i \"s/development/$npm_package_version/\" src/meta.js"
4849
},
4950
"dependencies": {},
5051
"devDependencies": {

src/meta.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const VERSION = "development";
2+
3+
module.exports = { VERSION: VERSION };

src/providers/doppler.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const https = require("https");
2-
2+
const { VERSION } = require("../meta");
33
/**
44
* Fetch secrets from Doppler the API.
55
* Requires the `DOPPLER_TOKEN` environment variable to be set. See https://docs.doppler.com/docs/enclave-service-tokens
@@ -13,12 +13,14 @@ async function fetch() {
1313
return new Promise(function (resolve, reject) {
1414
const encodedAuthData = Buffer.from(`${process.env.DOPPLER_TOKEN}:`).toString("base64");
1515
const authHeader = `Basic ${encodedAuthData}`;
16+
const userAgent = `gitops-secrets-nodejs/${VERSION}`;
1617
https
1718
.get(
1819
"https://api.doppler.com/v3/configs/config/secrets/download?format=json",
1920
{
2021
headers: {
2122
Authorization: authHeader,
23+
"user-agent": userAgent,
2224
},
2325
},
2426
(res) => {

0 commit comments

Comments
 (0)