[codex] Route shop users to Sub2API#38
Merged
Merged
Conversation
9cc1740 to
f7c0183
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
方案 A 要求公网入口切换为 Sub2API:Sub2API 负责用户 Key、套餐、余额和用量事实源;CLIProxyAPI 退为内网上游账号池;yui.web/shop 只保留展示和跳转入口。
改动
SHOP_LEGACY_KEY_ISSUANCE_DISABLED=true返回 410。/shop/和/shop/guide/改为公开可访问;账户相关页面继续要求登录。SUB2API_PUBLIC_URL服务端配置渲染,避免公网部署时指向访问者本机 localhost。验证
npm test:198/198 passnpm run build:css:通过git diff --check -- server.js .env.example shop/index.html shop/guide/index.html styles/site.css test/shop-flow.test.js test/shop-frontend.test.js:通过风险
SHOP_LEGACY_KEY_ISSUANCE_DISABLED=true后,旧 Shop 发 Key 和邀请码兑换路径会返回 410;这是本次迁移的预期行为。SUB2API_PUBLIC_URL,否则按钮会使用本地开发默认值http://localhost:18080。