Skip to content

Commit

Permalink
remove app env
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksanderBondar committed Jan 8, 2024
1 parent 0c7fccc commit 4691f70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/config/auth_options/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { VendureConfig } from "@vendure/core";
import { getEnvs } from "../../getEnvs";

const { SUPERADMIN_PASSWORD, SUPERADMIN_USERNAME, COOKIE_SECRET, APP_ENV } =
getEnvs();
const { SUPERADMIN_PASSWORD, SUPERADMIN_USERNAME, COOKIE_SECRET } = getEnvs();

export const authOptions: VendureConfig["authOptions"] = {
tokenMethod: ["bearer", "cookie"],
Expand All @@ -12,6 +11,8 @@ export const authOptions: VendureConfig["authOptions"] = {
},
cookieOptions: {
secret: COOKIE_SECRET,
...(APP_ENV === "dev" ? {} : { domain: ".aexol.com", sameSite: "lax" }),
...(process.env.APP_ENV === "dev"
? {}
: { domain: ".aexol.com", sameSite: "lax" }),
},
};
1 change: 0 additions & 1 deletion src/getEnvs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import "dotenv/config";
const envs = [
"API_URL",
"STOREFRONT_URL",
"APP_ENV",
"COOKIE_SECRET",
"SUPERADMIN_USERNAME",
"SUPERADMIN_PASSWORD",
Expand Down

0 comments on commit 4691f70

Please sign in to comment.