Browse Source

Try more fix

ghorsington 3 years ago
parent
commit
6b3423568a
3 changed files with 1 additions and 5 deletions
  1. 0 1
      web/src/routes/_layout.svelte
  2. 0 2
      web/src/routes/login/check.ts
  3. 1 2
      web/src/server.ts

+ 0 - 1
web/src/routes/_layout.svelte

@@ -11,7 +11,6 @@
   ) {
     const authResult = await this.fetch("/login/check");
     const result = (await authResult.json()) as AuthInfo;
-    console.log(result);
     if (path.startsWith("/login/")) {
       if (result.loggedIn) {
         return this.redirect(302, "/");

+ 0 - 2
web/src/routes/login/check.ts

@@ -8,8 +8,6 @@ export interface AuthInfo {
 
 type CheckResult = Promise<ExpressResponse<CheckResult>>;
 export const get = async (req: ExpressRequest, res: ExpressResponse): CheckResult => {
-    console.log(req.session);
-    console.log(req.session?.userId);
     if (!req.session?.userId) {
         return res.json({
             loggedIn: false,

+ 1 - 2
web/src/server.ts

@@ -39,8 +39,7 @@ const createSapperServer = async (): Promise<Express> => {
         session({
             secret: key,
             name: "session",
-            httpOnly: true,
-            domain: ENV.WEB_DOMAIN,
+            secure: true,
         }),
         compression({ threshold: 0 }),
         sirv("static", { dev }),