1+ /*
2+ * Copyright (c) 2023, Salesforce, Inc.
3+ * All rights reserved.
4+ * SPDX-License-Identifier: BSD-3-Clause
5+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6+ */
7+
8+ /*
9+ * Developer note! When updating this file, make sure to also update the
10+ * ssr.js template files in pwa-kit-create-app.
11+ *
12+ * In the pwa-kit-create-app, the templates are found under:
13+ * - assets/bootstrap/js/overrides/app/ssr.js.hbs
14+ * - assets/templates/@salesforce/retail-react-app/app/ssr.js.hbs
15+ */
16+
117'use strict'
218
319import crypto from 'crypto'
@@ -291,26 +307,17 @@ const {handler} = runtime.createHandler(options, (app) => {
291307 'img-src' : [
292308 // Default source for product images - replace with your CDN
293309 '*.commercecloud.salesforce.com' ,
294- 'checkoutshopper-test.adyen.com' ,
295- // Allow Google Pay specific imgs
296- 'https://www.gstatic.com/images/icons/material/system/1x/payment_white_36dp.png' ,
297- 'https://www.gstatic.com/instantbuy/svg/dark_gpay.svg'
310+ 'checkoutshopper-test.adyen.com'
298311 ] ,
299312 'script-src' : [
300313 // Used by the service worker in /worker/main.js
301- 'storage.googleapis.com' ,
302- 'https://pay.google.com/gp/p/js/pay.js' ,
303- '*.test1.my.pc-rnd.site.com' ,
304- '*.adyen.com' ,
305- 'https://checkoutshopper-test.adyen.com' ,
306- 'checkoutshopper-test.adyen.com'
314+ 'storage.googleapis.com'
307315 ] ,
308316 'connect-src' : [
309317 // Connect to Einstein APIs
310318 'api.cquotient.com' ,
311319 // Connect to DataCloud APIs
312320 '*.c360a.salesforce.com' ,
313- '*.test1.my.pc-rnd.salesforce-scrt.com' ,
314321 'https://api.lab.amplitude.com/sdk/vardata' ,
315322 '*.adyen.com' ,
316323 // Connect to SCRT2 URLs
@@ -319,19 +326,9 @@ const {handler} = runtime.createHandler(options, (app) => {
319326 'frame-src' : [
320327 // Allow frames from Salesforce site.com (Needed for MIAW)
321328 '*.site.com' ,
322- '*.test1.my.pc-rnd.salesforce-scrt.com' ,
323- '*.test1.my.pc-rnd.site.com' ,
324- 'checkoutshopper-test.adyen.com' ,
325- // Allow Google Pay Specific frames
326- 'https://pay.google.com'
329+ 'checkoutshopper-test.adyen.com'
327330 ] ,
328- 'frame-ancestors' : [
329- "'self'" ,
330- // MIAW
331- 'https://orgfarm-b31c63e95f.test1.my.pc-rnd.site.com' ,
332- // PWA
333- 'https://agent-checkout-payme-production.mobify-storefront.com'
334- ]
331+ 'frame-ancestors' : [ "'self'" ]
335332 }
336333 }
337334 } )
@@ -413,8 +410,8 @@ const {handler} = runtime.createHandler(options, (app) => {
413410 * }
414411 */
415412 registerAdyenEndpoints ( app , runtime )
416-
417413 app . get ( '*' , runtime . render )
418414} )
419415// SSR requires that we export a single handler function called 'get', that
416+ // supports AWS use of the server that we created above.
420417export const get = handler
0 commit comments