on 2020 Oct 30 10:25 AM
We have some custom pages in our SAP CC which make use of URLs in similar form as below:
<img src="${originalContextPath}/${MyImagePath}">
While the generated URL is as expected running on-premise, it does not look good while running in the cloud.
Given that ${MyImagePath} is "/_ui/responsive/images/mypic.png" we observe two different resulting URLs:
URL On-Premise: "/_ui/responsive/images/mypic.png"
URL in the cloud: "//_ui/responsive/images/mypic.png"
Notice the additional leading slash in the URL in the cloud, which leads to an invalid URL.
Our storefront configuration in manifest.json looks as follows:
{
"name": "accstorefront",
"properties": [
{
"key": "spring.session.enabled",
"value": "true"
},
{
"key": "spring.session.mystorefront.save",
"value": "async"
},
{
"key": "spring.session.mystorefront.cookie.name",
"value": "JSESSIONID"
},
{
"key": "spring.session.mystorefront.cookie.path",
"value": "/"
},
{
"key": "storefrontContextRoot",
"value": ""
}
],
"webapps": [
{
"name": "mediaweb",
"contextPath": "/medias"
},
{
"name": "mystorefront",
"contextPath": ""
},
{
"name": "acceleratorservices",
"contextPath": "/acceleratorservices"
},
{
"name": "smartedit",
"contextPath": "/smartedit"
},
{
"name": "cmssmartedit",
"contextPath": "/cmssmartedit"
}
]
},
What do we need to consider in addition, in order to fix this problem? Any help is highly appreciated.
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.