Skip to content
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

fix: pass headers in fetch, add user-agent #944

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

dominique-pfister
Copy link
Contributor

No description provided.

@@ -51,13 +51,16 @@ export default function bounce(func, { responder, timeout = 500, debounce = () =
})();
// invoke the current function again, via HTTP, with the x-hlx-bounce-id
// header set, so that we don't get into an endless loop
request.headers.set('x-hlx-bounce-id', bounceId);
Copy link
Contributor Author

@dominique-pfister dominique-pfister Jun 4, 2024

Choose a reason for hiding this comment

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

avoid changing passed in parameter request

Comment on lines +59 to +63
headers: {
...request.headers,
'x-hlx-bounce-id': bounceId,
'user-agent': 'adobe/helix-shared-bounce',
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

instead pass other headers here

@dominique-pfister dominique-pfister merged commit df3d126 into main Jun 4, 2024
8 checks passed
@dominique-pfister dominique-pfister deleted the pass-header-in-fetch branch June 4, 2024 08:02
adobe-bot pushed a commit that referenced this pull request Jun 4, 2024
# [@adobe/helix-shared-bounce-v2.0.19](https://github.com/adobe/helix-shared/compare/@adobe/helix-shared-bounce-v2.0.18...@adobe/helix-shared-bounce-v2.0.19) (2024-06-04)

### Bug Fixes

* pass headers in fetch, add user-agent ([#944](#944)) ([df3d126](df3d126))
@adobe-bot
Copy link

🎉 This PR is included in version @adobe/helix-shared-bounce-v2.0.19 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants