+ // Refresh timeout on valid session.
+ const cookieParts = [
+ sessionCookie,
+ 'HttpOnly',
+ `Path=${this.options.dingus.proxyPrefix}/`,
+ `Max-Age=${this.cookieLifespan}`,
+ ];
+ if (this.options.authenticator.secureAuthOnly) {
+ cookieParts.push('Secure');
+ }
+ res.setHeader(Enum.Header.SetCookie, cookieParts.join('; '));