SnapDrop / snapdrop

A Progressive Web App for local file sharing
https://snapdrop.net
GNU General Public License v3.0
18.41k stars 1.68k forks source link

Add Support For Cloudflare #622

Open hoothin opened 8 months ago

hoothin commented 8 months ago

Description:

This is just a minor fix, when users integrate their website's CDN with Cloudflare, Cloudflare hides the real IP address. As a result, the remoteAddress will always return Cloudflare's own IP address. This can cause Snapdrop to be unable to identify users in the same local network.

Benefits of this PR and context:

Enable users to obtain their real IP address while using Cloudflare, without affecting users who are not using Cloudflare.

How Has This Been Tested?

I have performed testing on my website s.hoothin.com.

zhuanghaotao commented 8 months ago

这是来自ZHNG-Haotiu邮箱自动回复。