Skip to content

Bug #70477 Playbook / Portal (RawURL in error not showing Hash)#178

Open
anishdwivedi-spraxa wants to merge 1 commit into
durlabhjain:mainfrom
anishdwivedi-spraxa:main
Open

Bug #70477 Playbook / Portal (RawURL in error not showing Hash)#178
anishdwivedi-spraxa wants to merge 1 commit into
durlabhjain:mainfrom
anishdwivedi-spraxa:main

Conversation

@anishdwivedi-spraxa

Copy link
Copy Markdown

Destructuring rawUrl from the log object and preferring it over req.referrer when setting the UrlReferrer query param.

Destructuring rawUrl from the log object and preferring it over req.referrer when setting the UrlReferrer query param.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the HTTP log transport (pino-http-send) to capture a more complete URL (including hash fragments) by preferring a rawUrl field from the log payload when populating the UrlReferrer query parameter, addressing a Portal/Playbook reporting gap where the hash was not visible.

Changes:

  • Destructure rawUrl from the log payload (others) so it can be used explicitly.
  • Prefer rawUrl over req.referrer when setting the UrlReferrer query param sent to the configured HTTP endpoint.

Comment thread lib/pino-http-send.mjs
queryParams.set("User Agent", req.userAgent || "");
queryParams.set("Absolute Url", req.url || "");
queryParams.set("UrlReferrer", req.referrer || "");
queryParams.set("UrlReferrer", rawUrl || req.referrer || "");

@durlabhjain durlabhjain left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

What's the point of this rawUrl

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