公开部署前收紧链接与并发边界 - #4
Merged
Merged
Conversation
Merged
Change3333
marked this pull request as ready for review
July 30, 2026 04:50
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.
做了什么
douyin.com及其子域名的 HTTP(S) 链接,拒绝相似域名、本机地址和其他协议为什么需要
公开部署后,旧接口会接受任意
http(s)地址并由服务器访问,存在被当作 SSRF 跳板的风险;同时每个请求都会启动浏览器,突发并发容易耗尽服务器资源。当前线上实例还直接暴露 Werkzeug 开发服务器,因此此 PR 先收紧应用层输入、运行和浏览器边界,合并后再切换到 Gunicorn + Nginx + HTTPS。用户体验影响
v.douyin.com分享短链继续支持验证
后续
合并后通过 Gunicorn + Nginx + HTTPS 部署到公开服务器,并在真实抖音分享链接上做一次线上冒烟测试。HSTS 和上游服务器信息隐藏应由 HTTPS 反向代理配置。