mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: remove outdated session.secure option
This commit is contained in:
1 parent
c989d1291d
commit
78be1d6fc5
3 files changed
+1
-4
No files matched your search
@@ -75,10 +75,9 @@ export default async (ctx: KoaContext, next: Next) => {
|
||||
if (!request.websocket) {
|
||||
const options: any = {
|
||||
expires: new Date(Date.now() + expireSeconds * 1000),
|
||||
secure: !!system.get('session.secure'),
|
||||
httpOnly: false,
|
||||
};
|
||||
if (system.get('session.domain')) {
|
||||
if (system.get('session.domain') && ctx.request.secure && ctx.request.host.endsWith(system.get('session.domain'))) {
|
||||
options.domain = system.get('session.domain');
|
||||
options.sameSite = 'none';
|
||||
options.secure = true;
|
||||
|
||||
Reference in new issue
Block a user