hybris - 更改 localhost:9002 以公开 API
问题描述
我正在尝试让 api 在 Azure VM 上运行。该网址将不再存在https://localhost:9002/rest/v2/ext/basestores/ext
,但是otherUrl:9002/rest/v2/ext/basestores/ext
.
有人能告诉我在哪里找那个吗?
非常感谢 :)
解决方案
不确定我是否正确地回答了您的问题,但至少从斯巴达克斯的角度来看,您可以backend.occ.baseUrl
为您需要的任何 URL 定义配置。
这是基本示例:
B2cStorefrontModule.withConfig({
backend: {
occ: {
baseUrl: 'https://localhost:9002',
prefix: '/rest/v2/'
}
},
}),
以下是如何设置 Spartacus 的文档: https ://sap.github.io/cloud-commerce-spartacus-storefront-docs/building-the-spartacus-storefront-from-libraries/#adding-import-declarations-和店面配置设置
推荐阅读
- java - 如何从不同的客户端传输块并使用 Java 在服务器中重新创建完整的文件?
- android - 前台服务是否需要唤醒锁才能在屏幕关闭后保持活动状态?
- python - PyTorch 迁移学习教程的混淆矩阵和测试准确率
- d3.js - d3js堆积条形图变量键
- struts2 - struts 2 name 字段名冲突
- java - 如何生成 jhipster 视图?
- algorithm - 具有起始和退出问题的凸多边形的最短距离
- centos - 我无法通过“net ads join”连接到 AD(winbind)
- javascript - 克隆的 bootstrap-selectpicker 选择关闭 1
- android - MVVM 架构组件 - 如何在片段中注入视图模型?