Merge pull request #82 from 9p4/disable-auth-properly

fix: disable authentication properly
This commit is contained in:
dec0dOS 2022-06-18 14:08:04 +03:00 committed by GitHub
commit 4151978a68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 16 deletions

View file

@ -18,11 +18,13 @@ const app = express();
app.use(logger("dev"));
app.use(express.json());
app.use(express.urlencoded({ extended: false }));
app.use(
bearerToken({
headerKey: "Bearer",
})
);
if (process.env.ZU_DISABLE_AUTH !== "true") {
app.use(
bearerToken({
headerKey: "Bearer",
})
);
}
if (
process.env.NODE_ENV === "production" &&