Skip to content

Conversation

@klaidliadon
Copy link
Contributor

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new Session-Type response header to expose the session type information to clients. The session type is already tracked internally (in context and logs) and used for access control, but was not previously exposed in HTTP response headers. This enhancement allows client applications to inspect the determined session type for debugging or auditing purposes.

  • Introduced a new constant HeaderSessionType for standardized header name usage
  • Set the Session-Type response header in both code paths of the Session middleware (early return for SpecialKey and normal flow)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
common.go Adds HeaderSessionType constant defining the "Session-Type" header name, following the same pattern as HeaderAccessKey
middleware.go Sets the Session-Type response header in the Session middleware for both the SpecialKey early return path and the standard session type determination path

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@klaidliadon klaidliadon merged commit 0d094b4 into master Dec 4, 2025
2 checks passed
@klaidliadon klaidliadon deleted the session-header branch December 4, 2025 12:52
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.

3 participants