Skip to content

Commit 675cc1c

Browse files
djnalluridekobon
authored andcommitted
Use string interpolation
1 parent b8319bc commit 675cc1c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/etc/nginx/include/s3gateway.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ async function _fetchWebIdentityCredentials(r) {
10491049
if (sts_regional === 'regional') {
10501050
var region = process.env['AWS_REGION'];
10511051
if (region) {
1052-
sts_endpoint = 'https://sts.' + region + '.amazonaws.com';
1052+
sts_endpoint = `https://sts.${region}.amazonaws.com`;
10531053
} else {
10541054
throw 'Missing required AWS_REGION env variable';
10551055
}
@@ -1060,7 +1060,7 @@ async function _fetchWebIdentityCredentials(r) {
10601060

10611061
var token = fs.readFileSync(process.env['AWS_WEB_IDENTITY_TOKEN_FILE']);
10621062

1063-
var params = "Version=2011-06-15&Action=AssumeRoleWithWebIdentity&RoleArn=" + arn + "&RoleSessionName=" + name + "&WebIdentityToken=" + token;
1063+
var params = `Version=2011-06-15&Action=AssumeRoleWithWebIdentity&RoleArn=${arn}&RoleSessionName=${name}&WebIdentityToken=${token}`;
10641064

10651065
var response = await ngx.fetch(sts_endpoint + "?" + params, {
10661066
headers: {

0 commit comments

Comments
 (0)