spring-projects / spring-projects/spring-session

Omitting Path of a cookie

Open
#811 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
1.9k
Forks
1.2k
Avg merge
4h 27m
Merged PRs (30d)
55

Description

Hi,

is it possible to completely omit Path attribute of a cookie?

From what I can see in DefaultCookieSerializer it doesn't seem possible.

I believe this can be useful in cases when an application is accessed from different paths.
And when Path is omitted browser will default to current resource path.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading DefaultCookieSerializer, which the issue identifies as the relevant entry point, to understand how the Path attribute is currently produced. Done means establishing a supported way to omit Path so browsers apply their default current-resource path behavior, with focused coverage for the resulting cookie output if the existing tests are located.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.