Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Changes to persist headers across internal service requests #8899

Merged
merged 2 commits into from
Sep 26, 2023

Conversation

hanzlamateen
Copy link
Member

@hanzlamateen hanzlamateen commented Sep 26, 2023

Summary

Through this change we can persist headers in params in all internal calls. Reference: https://discord.com/channels/509848480760725514/1155732337343090778

🤖 Generated by Copilot at 73bca8f

The pull request adds a new hook to createApp.ts that uses AsyncLocalStorage to store and access request headers across service calls. The hook is defined in a new file persist-headers.ts in the ./hooks folder.

References

closes #insert number here

Explanation

🤖 Generated by Copilot at 73bca8f

  • Import and apply persistHeaders hook to store and access request headers across service calls (link, link)
  • Define persistHeaders hook function in ./hooks/persist-headers.ts (link)

🤖 Generated by Copilot at 73bca8f

We persist the headers in the dark
With asyncLocalStorage we leave our mark
We access the context across the calls
We defy the limits of the protocol

QA Steps

List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.

Checklist

  • If this PR is still a WIP, convert to a draft
  • When this PR is ready, mark it as "Ready for review"
  • ensure all checks pass
  • Changes have been manually QA'd
  • Changes reviewed by at least 2 approved reviewers

@hanzlamateen hanzlamateen merged commit d9fc83d into dev Sep 26, 2023
7 checks passed
@hanzlamateen hanzlamateen deleted the persist-headers branch September 26, 2023 17:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants