Skip to content

Commit

Permalink
fix: allow locally-running functions to access files.slack.com (#66)
Browse files Browse the repository at this point in the history
* fix: allow locally-running functions to access files.slack.com

* tests
  • Loading branch information
filmaj committed Aug 1, 2024
1 parent 56f53ef commit bd1bc36
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/local-run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export const getCommandline = function (
} else {
allowedDomains.push("slack.com");
allowedDomains.push("api.slack.com");
allowedDomains.push("files.slack.com");
}
// Add deno.land to allow uncached remote deps
allowedDomains.push("deno.land");
Expand Down
10 changes: 5 additions & 5 deletions src/tests/local-run.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Deno.test("getCommandline function", async (t) => {
"--config=deno.jsonc",
"--allow-read",
"--allow-env",
"--allow-net=example.com,slack.com,api.slack.com,deno.land",
"--allow-net=example.com,slack.com,api.slack.com,files.slack.com,deno.land",
FAKE_DENO_LAND_EXPECTED_MODULE,
]);
});
Expand Down Expand Up @@ -84,7 +84,7 @@ Deno.test("getCommandline function", async (t) => {
"--config=deno.jsonc",
"--allow-read",
"--allow-env",
"--allow-net=slack.com,api.slack.com,deno.land",
"--allow-net=slack.com,api.slack.com,files.slack.com,deno.land",
FAKE_DENO_LAND_EXPECTED_MODULE,
]);
});
Expand All @@ -104,7 +104,7 @@ Deno.test("getCommandline function", async (t) => {
"--config=deno.jsonc",
"--allow-read",
"--allow-env",
"--allow-net=slack.com,api.slack.com,deno.land",
"--allow-net=slack.com,api.slack.com,files.slack.com,deno.land",
FAKE_FILE_EXPECTED_MODULE,
]);
});
Expand All @@ -124,7 +124,7 @@ Deno.test("getCommandline function", async (t) => {
"--config=deno.jsonc",
"--allow-read",
"--allow-env",
"--allow-net=example.com,slack.com,api.slack.com,deno.land",
"--allow-net=example.com,slack.com,api.slack.com,files.slack.com,deno.land",
"file:///local-run-function.ts",
]);
});
Expand All @@ -146,7 +146,7 @@ Deno.test("getCommandline function", async (t) => {
"--config=deno.jsonc",
"--allow-read",
"--allow-env",
"--allow-net=example.com,slack.com,api.slack.com,deno.land",
"--allow-net=example.com,slack.com,api.slack.com,files.slack.com,deno.land",
"file:///local-run-function.ts",
"--mycustomflag",
]);
Expand Down

0 comments on commit bd1bc36

Please sign in to comment.