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

poc: headers from config #267

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

poc: headers from config #267

wants to merge 3 commits into from

Conversation

sirugh
Copy link
Collaborator

@sirugh sirugh commented Dec 20, 2024

We want headers for fetchGraphQl, and query params for catalog service, to be managed entirely in config rather than requiring developers to make code changes to github. To solve, we can introduce two mechanisms. First, config values are set with some consistent path, ie commerce.headers.[scope].[header] where scope is like pdp and header is the string header key. The corresponding value will be injected as header or query param.

This PR is an initial effort at using this syntax, currently only within the config-dev file, so usable in localhost/development on this PR only.

image

TODO:

  • Discuss whether query param setting should be done with similar getQueryParams function or is it OK to use both query param and headers (ie spread the result of getHeaders over all header usage and query param usage for the scope?)

Test URLs:

Copy link

aem-code-sync bot commented Dec 20, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Copy link

aem-code-sync bot commented Dec 20, 2024

Page Scores Audits Google
📱 /products/crown-summit-backpack/24-MB03 PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /products/crown-summit-backpack/24-MB03 PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

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