feat(config): 更新配置以支持HTTPS域名访问
- 将所有环境的前端URL从localhost和IP地址更新为https://shopd.mtkj2025.com - 配置PayPal webhook使用HTTPS域名以满足PayPal安全要求 - 统一后端服务端口从18082调整为8082 - 更新Java代码中的默认URL配置和启动日志信息 - 创建域名配置、Nginx SSL配置和公网访问检查清单文档 - 为商品链接生成和API访问配置HTTPS协议支持
This commit is contained in:
@@ -46,8 +46,10 @@ public class MtkjpayApplication {
|
||||
String contextPath = env.getProperty("server.servlet.context-path", "");
|
||||
String activeProfiles = String.join(",", env.getActiveProfiles());
|
||||
|
||||
// 构建完整的访问地址
|
||||
String baseUrl = "http://localhost:" + serverPort + contextPath;
|
||||
// 构建完整的访问地址(使用域名)
|
||||
String serverHost = env.getProperty("app.server.host", "shopd.mtkj2025.com");
|
||||
String protocol = env.getProperty("app.server.protocol", "https");
|
||||
String baseUrl = protocol + "://" + serverHost + ":" + serverPort + contextPath;
|
||||
String apiUrl = baseUrl + "/api";
|
||||
String druidUrl = baseUrl + "/druid";
|
||||
|
||||
@@ -85,7 +87,7 @@ public class MtkjpayApplication {
|
||||
log.info("""
|
||||
|
||||
📌 提示:
|
||||
- 前端代理地址: http://localhost:3000
|
||||
- 前端地址: https://shopd.mtkj2025.com
|
||||
- 后端API地址: {}
|
||||
- 图片上传接口: {}/product/upload/image
|
||||
- 商品管理接口: {}/product
|
||||
|
||||
@@ -76,9 +76,9 @@ server:
|
||||
|
||||
# 应用配置(所有环境通用)
|
||||
app:
|
||||
# 前端访问地址(用于生成商品详情页URL等)
|
||||
# 前端访问地址(已配置SSL证书,使用HTTPS和域名)
|
||||
frontend:
|
||||
url: http://localhost:3000
|
||||
url: https://shopd.mtkj2025.com
|
||||
|
||||
# 阿里云OSS相关配置(所有环境通用)
|
||||
aliyun:
|
||||
|
||||
@@ -77,9 +77,9 @@ server:
|
||||
|
||||
# 应用配置(所有环境通用)
|
||||
app:
|
||||
# 前端访问地址(用于生成商品详情页URL等)
|
||||
# 前端访问地址(已配置SSL证书,使用HTTPS和域名)
|
||||
frontend:
|
||||
url: http://localhost:3000
|
||||
url: https://shopd.mtkj2025.com
|
||||
|
||||
# 阿里云OSS相关配置(所有环境通用)
|
||||
aliyun:
|
||||
|
||||
Reference in New Issue
Block a user