mirror of
https://github.com/cloudpanel-io/cloudpanel-ce.git
synced 2026-04-05 20:31:58 +02:00
"Allow traffic from Cloudflare only" only applies to port 443, not port 80 #65
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bkremenovic on 7/15/2025
CloudPanel version(s) affected
2.5.1
Description
CloudPanel’s "Allow traffic from Cloudflare only" option currently restricts traffic on port 443 (HTTPS) correctly, returning a 403 when accessed via server IP. However, the same protection does not apply to port 80 (HTTP). When accessing the server via its IP on port 80 with a spoofed Host header, the website is returned as normal, which defeats the purpose of the protection.
This issue was discovered while hosting a WordPress website, so I assume the default WordPress NGINX vhost template is being used.
This allows visitors to bypass Cloudflare entirely by using HTTP and targeting the server IP directly.
How to reproduce
Possible Solution
Extend the logic of the "Allow traffic from Cloudflare only" feature to apply to port 80 in addition to port 443. This could be done via:
Additional Context
No response