日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

关于SAP Spartacus在服务器端渲染模式和SAP Commerce Cloud API白名单的问题

發布時間:2023/12/19 编程问答 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 关于SAP Spartacus在服务器端渲染模式和SAP Commerce Cloud API白名单的问题 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

We are configuring our Spartacus application with SSR in SAP Commerce Cloud. Also we used the IP Filter Set to secure our endpoints in SAP Commerce Cloud, (JS Applications, Backoffice and API).

  • Spartacus部署在Commerce Cloud上。

  • SAP Commerce Cloud的API endpoints被IP Filter set保護。

  • We had experienced problems serving the request using SSR in our Spartacus application, after debugging the application we have confirmed the problem is in the whitelist of the API. When the whitelist is applied for a set of IP Filter set, spartacus is unable to access the API in SSR mode.

  • Spartacus無法在SSR模式下訪問API
  • We had removed the restriction in API, allowing anyone to access the API to test our Spartacus SSR application and in this case the application is served using SSR.

  • 去掉IP filter set后,問題消失。
  • We need to know which is the IP Range of the Spartacus application to add it in the whitelisting utility for the API endpoint.

  • 需要將SAP Spartacus Storefront在SSR模式下運行時的IP range添加到白名單。
  • All these endpoints are inside the SAP Cloud.

    We enabled SSR for Spartacus according to this documentation: https://sap.github.io/spartacus-docs/server-side-rendering-in-spartacus/

    On local machine it is working with a production build and the cloud API.

    In the manifest.json for the js-storefront the enableSSR property is set to true and deployed to the SAP Commerce Cloud.

    The SSR is not working at the moment on SAP Commerce Cloud and we have no possibility to debug it or get logs for that.

    The different services of the Conforama DEV / STG System running in the CCV2 Cloud are restricted and only whitelisted for some IPs (Customer, Some Webservices).

    The problem with that is, that when the Request to the OCC API endpoint is done by the Spartacus SSR, the IP is then not the one from the actual user, e.g. myself. but the IP from the Server, where the JS Storefront is running on.
    Because that IP is not whitelisted, the Apache Server returns a 403 error and the SSR rendering never completes with Rendering.

    There is an open CCV2 Ticket (https://cxjira.sap.com/browse/MTD-12988) to fix this issue and ignore any IP restrictions when the request comes from an internal ip (=SSR Request).
    For now, we where able to find a workaround by adding the IP of the Storefront as a restriction. Of course, that is only a temporary solution, as this IP could change.

    action item

    We need to find a better way to allow the internally allow the SSR pod to access the API pod.

    創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎

    總結

    以上是生活随笔為你收集整理的关于SAP Spartacus在服务器端渲染模式和SAP Commerce Cloud API白名单的问题的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。