-
Notifications
You must be signed in to change notification settings - Fork 3
Replace hardcoded Coveo api keys with a call to Netlify function #35
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
Conversation
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.
Approving for the intent of the effort and to ensure any minimum amount of approvals for merges is reached, but I defer to @nginx-jack to decide when the PR is ready to actually merge.
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.
Good to merge once it's validated on a dev environment in netlify 👍
Proposed changes
Previously the values of each Coveo API key were hardcoded into the hugo theme code in
layouts/partial/scripts.html
which would pass the appropriate key value to thejs.Build
command. This would result in the api key being embedded in the minified javascript code, and observable via the inspection tools in a web browser.This change removes those hardcoded values and replaces them with an API call to a Netlify function which will return the value of the
COVEO_SEARCH_TOKEN
variable from the Netlify site's environment variables.Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTING
documentREADME.md
andCHANGELOG.md
)