QuestionQ2

Designing a solution architecture

The customer wants an ecommerce website with several site pages that meet these criteria:

  • AEM servers and the ecommerce platform are hosted and managed on separate domains.
  • Timing constraints and ecommerce product evolution require the cart and product pages to be delivered directly from the ecommerce platform, not by AEM.
  • Part of the page is written with an SPA framework.

What should the Architect do to mitigate Cross-Origin Resource Sharing?

  • A Use Server Side Include on AEM pages to display ecommerce data
  • B Use OSGI services to make calls to the ecommerce platform
  • C Use Ajax calls to make calls to the ecommerce platform
  • D Use proxy server to separate traffic for AEM and ecommerce platforms
Explanation

A reverse proxy can present AEM and the ecommerce platform under one browser-facing origin while routing the relevant requests to their separate back ends. This allows the SPA to request cart and product resources without a cross-origin browser request, while those pages remain directly served by the ecommerce platform. Adobe notes that serving connected applications from the same domain avoids the browser CORS restrictions that apply when they are on different domains.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!