Files
FruitServer/fruitshorts-app-api/src/main/resources/application-prod.yml
T

41 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Author: fruit.com.cn
#
# 生产 profile(--spring.profiles.active=prod):
# 1) 集中生产开关,不在这里写任何密钥 —— 密钥一律环境变量注入;
# 2) 密钥缺失/还是 dev 默认值/签名没开 → ProdSecretGuard 直接让启动失败(fail-fast)。
server:
# 容器里由编排再映射;保持 8081 便于与 runbook 一致
port: ${SERVER_PORT:8081}
tomcat:
# 生产前置反代,真实 IP 从 X-Forwarded-* 取
remoteip:
remote-ip-header: X-Forwarded-For
protocol-header: X-Forwarded-Proto
spring:
lifecycle:
timeout-per-shutdown-phase: 30s
fruitshorts:
auth:
register-max-per-ip-per-day: 5
register-max-per-device-per-day: 3
media:
# 生产必须开启播放地址签名(docs/12-上线检查清单)
signature-required: true
cors:
# 生产只允许显式配置的来源;没配就等于空,浏览器侧会被拦住(比"*"安全)
allowed-origins: ${CORS_ALLOWED_ORIGINS:}
springdoc:
# 生产只留机器可读契约,关掉 UI(doc.html 不对外开放)
swagger-ui:
enabled: ${SWAGGER_ENABLED:false}
api-docs:
enabled: ${SWAGGER_ENABLED:false}
logging:
level:
root: info
com.fruitshorts: info