mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #5425] [MERGED] feat: add configurable session cookie name #5197
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5197
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5425
Author: @CHANDRAHARSHIT
Created: 10/2/2025
Status: ✅ Merged
Merged: 10/28/2025
Merged by: @jamesgeorge007
Base:
next← Head:Sessioncookie📝 Commits (10+)
9b3d6e0Allow session cookie name override via config4f2be3eAdded Session Cookie Name Configuration42cb547Allow session cookie name override via config71879dfAdded Session Cookie Name Configurationdf3027drefactor: session config type usage408562dUpdate session cookie help text styling7b4c72cMerge remote changes and keep consistent hint text styling5f81d87chore(admin): use shared cookie-name regex; feat(admin): mark session_cookie_name optional via metadata and remove hardcoded exclusion2bf2e85chore: merge latest changes3a67193refactor: optimize optional field validation and improve error messaging📊 Changes
8 files changed (+68 additions, -3 deletions)
View changed files
📝
packages/hoppscotch-backend/src/infra-config/helper.ts(+5 -0)📝
packages/hoppscotch-backend/src/infra-config/infra-config.service.ts(+5 -0)📝
packages/hoppscotch-backend/src/main.ts(+6 -1)📝
packages/hoppscotch-backend/src/types/InfraConfig.ts(+1 -0)📝
packages/hoppscotch-sh-admin/locales/en.json(+3 -0)📝
packages/hoppscotch-sh-admin/src/components/settings/AuthToken.vue(+14 -0)📝
packages/hoppscotch-sh-admin/src/composables/useConfigHandler.ts(+26 -2)📝
packages/hoppscotch-sh-admin/src/helpers/configs.ts(+8 -0)📄 Description
What's changed
This pull request introduces support for configuring the session cookie name in the backend and admin UI, allowing deployments to override the default
connect.sidcookie name for compatibility with certain proxies and load balancers. It includes backend changes to accept and validate the new configuration, updates to the admin interface for editing this value, and ensures validation on both backend and frontend.Backend support for session cookie name configuration:
SESSION_COOKIE_NAMEto theInfraConfigEnumand included it in the default infrastructure configs, allowing it to be set and stored (InfraConfigEnum,getDefaultInfraConfigs) [1] [2].'connect.sid'if unset, and documented the reason for this option (main.ts).infra-config.service.ts).Admin UI and configuration handling:
AuthToken.vue,en.json) [1] [2].useConfigHandler.ts,configs.ts) [1] [2] [3] [4] [5] [6].Notes to reviewers
Test the additional field added in the Admin Dashboard's setting page.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.