We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1307ae commit aa143e6Copy full SHA for aa143e6
src/routes/v1/Aws.ts
@@ -7,10 +7,11 @@ const router = Router();
7
8
9
router.get('/securitygroups', async (req: Request, res: Response) => {
10
- const { region, access_key, secret_key } = req.headers;
11
-
+ const { access_key, secret_key } = req.headers;
+ const { region } = req.query
12
+
13
let ret:PromiseType = await execShellCommand(`docker-compose -f helper/docker-compose.yml run \
- -e AWS_DEFAULT_REGION=${region} \
14
+ -e AWS_DEFAULT_REGION=${region || 'us-east-1'} \
15
-e AWS_ACCESS_KEY_ID=${access_key} \
16
-e AWS_SECRET_ACCESS_KEY=${secret_key} \
17
--rm aws ec2 describe-security-groups \
0 commit comments