Skip to content

Commit

Permalink
chore(examples): Add ARCJET_ENV to Bun and SvelteKit env files (#970)
Browse files Browse the repository at this point in the history
Closes #969 

Localhost IP addresses are only allowed in development mode now. Bun doesn't set `NODE_ENV` for you like Node does, so you need to set `ARCJET_ENV` in your environment file.

The reason this checks **explicitly** for development environment is that we don't want to allow non-global IPs if users deploy there service and forget to set an environment.
  • Loading branch information
blaine-arcjet authored Jun 13, 2024
1 parent f563848 commit 8a20d30
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion examples/bun-hono-rl/.env.local.example
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
ARCJET_KEY=
# Run Arcjet in development mode because Bun.sh doesn't explicitly
# set an environment variable like Node.js does
ARCJET_ENV=development
ARCJET_KEY=
3 changes: 3 additions & 0 deletions examples/bun-rl/.env.local.example
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# Run Arcjet in development mode because Bun.sh doesn't explicitly
# set an environment variable like Node.js does
ARCJET_ENV=development
ARCJET_KEY=
5 changes: 4 additions & 1 deletion examples/sveltekit/.env.example
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
ARCJET_KEY=
# Run Arcjet in development mode because SvelteKit might not explicitly
# set an environment variable like Node.js does
ARCJET_ENV=development
ARCJET_KEY=

0 comments on commit 8a20d30

Please sign in to comment.