Skip to content

Commit

Permalink
Allow TRACE_API_SECRET undefined when local dev (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leslie-Wong-H authored Apr 22, 2023
2 parents 9e1e438 + 52db593 commit a0b3765
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
branches: [main]

jobs:
build:
e2e-build:
runs-on: ubuntu-latest

strategy:
Expand Down
2 changes: 1 addition & 1 deletion src/check-secret.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import "dotenv/config";
const { TRACE_API_SECRET } = process.env;

export default async (req, res, next) => {
if (req.header("x-trace-secret") !== TRACE_API_SECRET) {
if (TRACE_API_SECRET && req.header("x-trace-secret") !== TRACE_API_SECRET) {
res.status(401).send("Unauthorized");
return;
}
Expand Down

0 comments on commit a0b3765

Please sign in to comment.