-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(router): add accept language header middleware #5500
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
srujanchikke
added
A-framework
Area: Framework
C-feature
Category: Feature request or enhancement
S-waiting-on-review
Status: This PR has been implemented and needs to be reviewed
labels
Aug 1, 2024
SanchithHegde
previously approved these changes
Aug 2, 2024
SanchithHegde
approved these changes
Aug 2, 2024
pixincreate
approved these changes
Aug 3, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than that, LGTM!
likhinbopanna
removed
the
S-waiting-on-review
Status: This PR has been implemented and needs to be reviewed
label
Aug 5, 2024
pixincreate
added a commit
that referenced
this pull request
Aug 5, 2024
…ypress-x2 * 'main' of github.com:juspay/hyperswitch: refactor(cypress): pass `connector_type` externally (#5522) refactor(router): refactor merchant_connector update v2 flow (#5484) feat(router): add accept language header middleware (#5500) chore(version): 2024.08.05.0 chore(postman): update Postman collection files fix(pm_auth): Added mca status check in pml (#5421) refactor(payment_methods): List the Payment Methods for Merchant , based on the connector type (#4909) fix(router): [Iatapay] make error status and error message optional (#5382) chore(version): 2024.08.02.0 feat(business_profile): introduce domain models for business profile v1 and v2 APIs (#5497) feat(auth): Add `profile_id` in `AuthenticationData` (#5492) feat(core): accept business profile in core functions for payments, refund, payout and disputes (#5498) refactor(router): domain and diesel model changes for merchant_connector_account create v2 flow (#5462) fix(open_payment_links): send displaySavedPaymentMethods as false explicitly for open payment links (#5501) refactor(role): determine level of role entity (#5488)
pixincreate
added a commit
that referenced
this pull request
Aug 5, 2024
* 'main' of github.com:juspay/hyperswitch: (37 commits) fix(connector): Fixed status mapping for Plaid (#5525) feat(core): accept profile_id in merchant_account, connectors and customers core functions (#5505) refactor(auth): Pass `profile_id` from the auth to core functions (#5520) refactor(routing): Refactor api v2 routes for deactivating and retrieving the routing config (#5478) refactor(cypress): pass `connector_type` externally (#5522) refactor(router): refactor merchant_connector update v2 flow (#5484) feat(router): add accept language header middleware (#5500) chore(version): 2024.08.05.0 chore(postman): update Postman collection files fix(pm_auth): Added mca status check in pml (#5421) refactor(payment_methods): List the Payment Methods for Merchant , based on the connector type (#4909) fix(router): [Iatapay] make error status and error message optional (#5382) chore(version): 2024.08.02.0 feat(business_profile): introduce domain models for business profile v1 and v2 APIs (#5497) feat(auth): Add `profile_id` in `AuthenticationData` (#5492) feat(core): accept business profile in core functions for payments, refund, payout and disputes (#5498) refactor(router): domain and diesel model changes for merchant_connector_account create v2 flow (#5462) fix(open_payment_links): send displaySavedPaymentMethods as false explicitly for open payment links (#5501) refactor(role): determine level of role entity (#5488) feat(cypress): add corner cases (#5481) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
add accept language header middleware .
Case 1 : when query parameter locale is present it should overwrite the Accept-Language headers in the middleware for api request.
Case 2: If query parameter is not present then if request have Accept-Language headers, do nothing.
Case 3 : Incase if both query param & header is not present we should add new header Accept-Language header with default value "en".
This feature is meant to be used by internal api's, We will not suggest merchant to send query parameter . SDK will pass this headers to backend to perform backend loaclization. Will consume this header input and perform backend localization in future.
Additional Changes
Motivation and Context
How did you test it?
create any api request to hyperswitch with query params locale this should add accept-language header in the request. you can check this in the logs.
Checklist
cargo +nightly fmt --all
cargo clippy