[GH-ISSUE #5378] [feature]: Support alternate session cookie name #2063

Closed
opened 2026-03-16 23:02:51 +03:00 by kerem · 5 comments
Owner

Originally created by @treyturner-nirvana on GitHub (Sep 5, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5378

Originally assigned to: @CHANDRAHARSHIT on GitHub.

Is there an existing issue for this?

  • I have searched the existing issues

Summary

I'm using Kong 3.4.2 and need to configure sticky sessions in order to end up on the same pod during OAuth callback that redirected me to OAuth to begin with (so as to prevent a 401 when I return). Unfortunately, this version of Kong doesn't allow for hashing based on cookie names that include a period like connect.sid:

2025-09-05T16:56:21Z    error   failed updating gateway entity  {"action": "update", "kind": "upstream", "name": "httproute.hoppscotch.hoppscotch-api.0", "error": "HTTP status 400 (message: \"2 schema violations (failed conditional validation given value of field 'hash_on'; hash_on_cookie: bad cookie name 'connect.sid', allowed characters are A-Z, a-z, 0-9, '_', and '-')\")"}

I'll work on getting my org to upgrade Kong; in the interim a convenient handle in support of a workaround would be to allow renaming the cookie as documented here:

const session = require('express-session');
app.use(session({
    name : process.env.SESSION_COOKIE_NAME || 'connect.sid',
    ...
}));

Thanks for your consideration.

Why should this be worked on?

I can't run more than one replica and successfully login with OAuth using Kong 3.4.2 without the ability to rename the session cookie.

Originally created by @treyturner-nirvana on GitHub (Sep 5, 2025). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5378 Originally assigned to: @CHANDRAHARSHIT on GitHub. ### Is there an existing issue for this? - [x] I have searched the existing issues ### Summary I'm using Kong 3.4.2 and need to configure sticky sessions in order to end up on the same pod during OAuth callback that redirected me to OAuth to begin with (so as to prevent a 401 when I return). Unfortunately, this version of Kong doesn't allow for hashing based on cookie names that include a period like `connect.sid`: ``` 2025-09-05T16:56:21Z error failed updating gateway entity {"action": "update", "kind": "upstream", "name": "httproute.hoppscotch.hoppscotch-api.0", "error": "HTTP status 400 (message: \"2 schema violations (failed conditional validation given value of field 'hash_on'; hash_on_cookie: bad cookie name 'connect.sid', allowed characters are A-Z, a-z, 0-9, '_', and '-')\")"} ``` I'll work on getting my org to upgrade Kong; in the interim a convenient handle in support of a workaround would be to allow renaming the cookie as documented [here](https://expressjs.com/en/resources/middleware/session.html): ``` const session = require('express-session'); app.use(session({ name : process.env.SESSION_COOKIE_NAME || 'connect.sid', ... })); ``` Thanks for your consideration. ### Why should this be worked on? I can't run more than one replica and successfully login with OAuth using Kong 3.4.2 without the ability to rename the session cookie.
kerem 2026-03-16 23:02:51 +03:00
  • closed this issue
  • added the
    feature
    label
Author
Owner

@yashgoyal0110 commented on GitHub (Sep 30, 2025):

Hey @treyturner-nirvana
May i work on it?

<!-- gh-comment-id:3353696523 --> @yashgoyal0110 commented on GitHub (Sep 30, 2025): Hey @treyturner-nirvana May i work on it?
Author
Owner

@CHANDRAHARSHIT commented on GitHub (Oct 2, 2025):

Adds an optional override for the express-session cookie name so deployments can avoid the default connect.sid (which contains a dot).
This helps Kong 3.4.2 sticky sessions, which can’t hash cookie names with dots (only A–Z, a–z, 0–9, _ and - are allowed).

<!-- gh-comment-id:3359138934 --> @CHANDRAHARSHIT commented on GitHub (Oct 2, 2025): Adds an optional override for the express-session cookie name so deployments can avoid the default connect.sid (which contains a dot). This helps Kong 3.4.2 sticky sessions, which can’t hash cookie names with dots (only A–Z, a–z, 0–9, _ and - are allowed).
Author
Owner

@jamesgeorge007 commented on GitHub (Oct 31, 2025):

Hi @treyturner-nirvana, closing this issue since it is now addressed in the latest release. Please feel free to share any feedback.

<!-- gh-comment-id:3473044537 --> @jamesgeorge007 commented on GitHub (Oct 31, 2025): Hi @treyturner-nirvana, closing this issue since it is now addressed in the [latest release](https://github.com/hoppscotch/hoppscotch/releases/tag/2025.10.0). Please feel free to share any feedback.
Author
Owner

@jamesgeorge007 commented on GitHub (Oct 31, 2025):

Session cookie name can be configured from the Admin dashboard settings page.

Image
<!-- gh-comment-id:3473062760 --> @jamesgeorge007 commented on GitHub (Oct 31, 2025): Session cookie name can be configured from the Admin dashboard settings page. <img width="1415" height="853" alt="Image" src="https://github.com/user-attachments/assets/d674ed7e-92be-4b51-9b83-0772ddfa12c0" />
Author
Owner

@treyturner-nirvana commented on GitHub (Nov 7, 2025):

Thanks for the rapid response on this @CHANDRAHARSHIT, I really appreciate it! This works great for my purposes.

Technically I can't think of a reason to reject periods in the override name. It was a problem for my environment, but it'd be fine in lots of others. I'm sure it could wait for someone to ask about it though 😁 Cheers! 🥂

<!-- gh-comment-id:3500061407 --> @treyturner-nirvana commented on GitHub (Nov 7, 2025): Thanks for the rapid response on this @CHANDRAHARSHIT, I really appreciate it! This works great for my purposes. Technically I can't think of a reason to reject periods in the override name. It was a problem for my environment, but it'd be fine in lots of others. I'm sure it could wait for someone to ask about it though 😁 Cheers! 🥂
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#2063
No description provided.