Skip to content

Fix http scheme evaluation and removed origin from evaluation #458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pavan-traceable
Copy link
Contributor

@pavan-traceable pavan-traceable commented Apr 9, 2025

Description

HTTP Scheme Evaluation Logic

This change refines the logic to determine the HTTP scheme (http or https) from an event by evaluating relevant attributes in a prioritized manner:

  1. If a full URL (e.g., http.url) is present and contains https, it is returned immediately.
  2. If the URL exists but has a non-https scheme (e.g., http), headers like x-forwarded-proto, forwarded, or http.scheme are checked. If any of these indicate https, it is preferred and returned.
  3. If no https scheme is found, the scheme from the URL (typically http) is returned as a fallback.
  4. If no URL is available, the scheme is derived from the above-mentioned headers alone.

Note: This change also removes scheme evaluation based on origin header attribute which exists previously

@pavan-traceable pavan-traceable requested a review from a team as a code owner April 9, 2025 06:30
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.

1 participant