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.
考虑到 Vercel 和 Netlify 都是运行在 AWS Lambda 上,我尝试直接将 Twikoo 部署到 AWS Lambda 上。
我试着将 Netlify 的兼容代码改了一份,放到 Lambda 上跑了一下,能工作,但似乎拿不到评论者的 IP 地址。
我的 JavaScript 水平不精,找不到问题所在。根据 AWS 文档,IP 地址存储于
requestContext.http.sourceIp
里,我也把这段设置到TWIKOO_IP_HEADERS
里了,但服务端依然拿不到地址。是因为只支持 IPv4 吗?