Commit 2cd8f1c9 authored by bokuweb's avatar bokuweb Committed by Tim Neutkens

Update server.js (#10056)

I think `httpOnly` property should set as `cookie`'s property.
This is because `SessionOptions` is following.

```
  interface SessionOptions {
    secret: string | string[];
    name?: string;
    store?: Store | MemoryStore;
    cookie?: {
      maxAge?: number;
      signed?: boolean;
      expires?: Date;
      httpOnly?: boolean;
      path?: string;
      domain?: string;
      secure?: boolean | 'auto';
      encode?: (val: string) => string;
      sameSite?: boolean | 'lax' | 'strict' | 'none';
    };
    genid?(req: express.Request): string;
    rolling?: boolean;
    resave?: boolean;
    proxy?: boolean;
    saveUninitialized?: boolean;
    unset?: string;
  }
```
parent 3096a772
...@@ -28,8 +28,7 @@ app.prepare().then(() => { ...@@ -28,8 +28,7 @@ app.prepare().then(() => {
store: new FileStore({ secret: 'geheimnis' }), store: new FileStore({ secret: 'geheimnis' }),
resave: false, resave: false,
rolling: true, rolling: true,
httpOnly: true, cookie: { maxAge: 604800000, httpOnly: true }, // week
cookie: { maxAge: 604800000 }, // week
}) })
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment