Skip to content

feat(http): configurable origin cookie#21

Merged
petermasking merged 5 commits into
mainfrom
20-configurable-origin-cookie
May 19, 2026
Merged

feat(http): configurable origin cookie#21
petermasking merged 5 commits into
mainfrom
20-configurable-origin-cookie

Conversation

@basmasking
Copy link
Copy Markdown
Member

Fixes #20

Changes proposed in this pull request:

  • made the origin cookie values configurable
  • updated docs
  • updated dependencies

Bumped version (Y/N) : Yes, to 0.1.5

@basmasking basmasking requested a review from petermasking as a code owner May 14, 2026 14:14
@basmasking basmasking linked an issue May 14, 2026 that may be closed by this pull request
Comment thread packages/http/src/OriginMiddleware.ts Outdated
#sameSite: string;
#secure: boolean;

#httpOnly = 'HttpOnly';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this a field if it's always a part of the cookie?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I first had it as an input option, but then I removed it. Is this middleware prescriptive or not?

I decided that, as jitar plugins, we have a say in how things are done. That's why it is always part of the cookie, and it cannot get read by JavaScript.

If you agree, then I would also fix the path on /rpc, as that's the only endpoint towards Jitar.

@petermasking petermasking merged commit b9eb540 into main May 19, 2026
10 checks passed
@petermasking petermasking deleted the 20-configurable-origin-cookie branch May 19, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configurable origin cookie

2 participants