• Home
  • Jobs
  • Courses
  • Questions
  • Teachers
  • For business
  • ES/EN

0

28
Views
Legacy HapiJS / Cookies with SameSite=None

Due to some legacy issues, we are unable to upgrade HapiJS to their newer versions. We're currently blocked at "16.7.0".

Unfortunately, this specific version of HapiJS only accepts isSameSite as a boolean, therefore no longer compatible with the current Cookie Spec (whereas SameSite is required to specifically be None).

function handler(request, reply) {
  reply.state('CookieName', 'CookieValue', {
    /* string */ domain: `.${process.env.DOMAIN}`,
    /* number */ ttl: 24 * 60 * 60 * 1000,
    /* boolean */ isHttpOnly: false,
    /* boolean */ isSecure  : true,
    /* boolean */ isSameSite: false,
    /* string */ path: '/'
  });
}

Is there a way to override their internals to force SameSite=None?

{
  "hapi": "16.7.0"
}
about 1 month ago ·

Juan Pablo Isaza

Answer question
Find remote jobs
Loading

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2022 PeakU Inc. All Rights Reserved.