Skip to content

Commit 89f72d4

Browse files
committed
fix: remove unused param
1 parent 49c0593 commit 89f72d4

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

index.js

+3-7
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function isTokenExpired(expires) {
1919

2020
const firestore = new Firestore();
2121

22-
export default function init({ app, mappings, host, claimsCheck, proxyOptions, verbose, appendToken = true }) {
22+
export default function init({ app, mappings, host, claimsCheck, proxyOptions, verbose }) {
2323
if (!app) {
2424
app = express();
2525
}
@@ -68,13 +68,9 @@ export default function init({ app, mappings, host, claimsCheck, proxyOptions, v
6868
target: host,
6969
changeOrigin: true,
7070
pathRewrite: async (path) => {
71-
const [mappedPath, credentials] = applyMappings(path, mappings, appendToken);
71+
const [mappedPath, credentials] = applyMappings(path, mappings);
7272

73-
if (appendToken) {
74-
return applyToken(mappedPath, await getToken(credentials));
75-
} else {
76-
return mappedPath;
77-
}
73+
return applyToken(mappedPath, await getToken(credentials));
7874
},
7975
logProvider: () => functions.logger,
8076
logLevel: verbose ? 'debug' : 'info',

utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export function applyMappings(path, mappings, appendToken = true) {
1+
export function applyMappings(path, mappings) {
22
let variableName;
33
for (const { from, to, secrets } of mappings) {
44
if (from.test(path)) {

0 commit comments

Comments
 (0)