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

feat: add reverse proxy worker for newsletter signup #405

Merged
merged 14 commits into from
Feb 24, 2024
Merged

Conversation

ramboz
Copy link
Collaborator

@ramboz ramboz commented Feb 23, 2024

This adds the code for the reverse-proxy compute action that will run on the Fastly CDN and proxy the calls for the newsletter.

POST https://aem-eds-petplace.edgecompute.app/services/newsletter
Origin: https://www.petplace.com
Content-Type: application/json

{
  "EventDefinitionKey": "APIEvent-74e121c6-6308-c35e-8320-d335ee59f191",
  "ContactKey": "…",
  "Data": {
    "email": "…",
    "first_name": "justtestin",
    "catnewsletter": "false",
    "dognewsletter": "false"
  }
}

Copy link
Contributor

aem-code-sync bot commented Feb 23, 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

@ramboz ramboz marked this pull request as ready for review February 23, 2024 19:37

[[local_server.secret_stores.services_secrets]]
key = "newsletter_client_id"
data = "gqn2wsm10glznu7m3vjpv3i3"
Copy link
Collaborator

Choose a reason for hiding this comment

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

does having the client id and client secret out in the open cause an issue in terms of data security??

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes 🤦🏼 That wasn't intended!

Copy link
Collaborator

@ankyc-phi ankyc-phi left a comment

Choose a reason for hiding this comment

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

LGTM :)

@ramboz ramboz merged commit 0ef2b5c into main Feb 24, 2024
1 of 2 checks passed
@ramboz ramboz deleted the reverse-proxy branch February 24, 2024 02:18
ankyc-phi added a commit that referenced this pull request Feb 28, 2024
Includes:
- changed base uri, and updated api key
- updated form payload (+ country, - date)
- request payload and headers updated
- base uri is using the reverse proxy cdn setup

Jira Issues:
https://pethealthinc.atlassian.net/browse/PM-143

Related: #405

Test URLs:
- Before: https://main--petplace--hlxsites.hlx.page/
- After:
  - https://feat-update-newsletter-api--petplace--hlxsites.hlx.live/
-
https://feat-update-newsletter-api--petplace--hlxsites.hlx.live/?martech=off

---------

Co-authored-by: Julien Ramboz <ramboz@users.noreply.github.com>
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.

2 participants