mirror of
https://github.com/dec0dOS/zero-ui.git
synced 2025-07-05 20:41:43 -07:00
Merge pull request #82 from 9p4/disable-auth-properly
fix: disable authentication properly
This commit is contained in:
commit
4151978a68
5 changed files with 29 additions and 16 deletions
|
@ -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" &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue