fix(worker): 补齐 prod 密钥与 CORS 映射以通过密钥校验
worker 的 application-prod.yml 没把 JWT_ADMIN_SECRET / JWT_APP_SECRET / MEDIA_SIGNATURE_SECRET / CORS_ALLOWED_ORIGINS 映射成 fruitshorts.* 属性, ProdSecretGuard 读到空值即拒绝启动,compose 里 worker 一直 Restarting。 按两个入口同一口径补齐映射:不写 dev 默认值,漏配仍 fail-fast; 并显式置 signature-required=true,与两个入口一致。 门禁:mvn test 全模块 BUILD SUCCESS(0 失败 0 错误,1 项 ffmpeg smoke 按用例设计跳过)。
This commit is contained in:
1 parent
8b46e535c5
commit
4c4f64323a
1 file changed
+11
@@ -11,12 +11,23 @@ spring:
|
|||||||
timeout-per-shutdown-phase: 30s
|
timeout-per-shutdown-phase: 30s
|
||||||
|
|
||||||
fruitshorts:
|
fruitshorts:
|
||||||
|
jwt:
|
||||||
|
# worker 本身不签发/校验令牌,但 ProdSecretGuard 要求 prod 下密钥齐全;
|
||||||
|
# 不给 dev 默认值,漏配即启动失败(与两个入口同一口径)
|
||||||
|
admin-secret: ${JWT_ADMIN_SECRET:}
|
||||||
|
app-secret: ${JWT_APP_SECRET:}
|
||||||
media:
|
media:
|
||||||
|
# 生产必开播放签名(与两个入口一致,fail-fast 也要求为 true)
|
||||||
|
signature-secret: ${MEDIA_SIGNATURE_SECRET:}
|
||||||
|
signature-required: true
|
||||||
transcode:
|
transcode:
|
||||||
# 生产此进程必须真的跑转码
|
# 生产此进程必须真的跑转码
|
||||||
worker-enabled: true
|
worker-enabled: true
|
||||||
# 生产按小时级重试间隔,避免坏片源把队列打满
|
# 生产按小时级重试间隔,避免坏片源把队列打满
|
||||||
poll-delay-ms: ${TRANSCODE_POLL_DELAY_MS:5000}
|
poll-delay-ms: ${TRANSCODE_POLL_DELAY_MS:5000}
|
||||||
|
cors:
|
||||||
|
# worker 不对外提供接口,仅为通过 prod fail-fast 校验
|
||||||
|
allowed-origins: ${CORS_ALLOWED_ORIGINS:}
|
||||||
|
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
|
|||||||
Reference in new issue
Block a user