Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 在cloudflare cdn环境下获取ip不正确 #739

Closed
wants to merge 2 commits into from
Closed

fix: 在cloudflare cdn环境下获取ip不正确 #739

wants to merge 2 commits into from

Conversation

MengNianxiaoyao
Copy link

修复#734

@imaegoo
Copy link
Member

imaegoo commented Aug 5, 2024

这两种写法是一样的啊

@@ -955,8 +955,8 @@ async function createCollections () {

function getIp (request) {
try {
const { TWIKOO_IP_HEADERS } = process.env
const headers = TWIKOO_IP_HEADERS ? JSON.parse(TWIKOO_IP_HEADERS) : []
const TWIKOO_IP_HEADERS = process.env.TWIKOO_IP_HEADERS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应使用 解构赋值

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants