/dev/null
CDCloudflare Developers
•Created by /dev/null on 2/27/2025 in #general-help
Securing a Cloudflare-Proxied a Server Against Unauthorized Frontend Requests
Here is my hypothetical solution:
In the CF ervice, there is a feature to block requests based on URL queries. One of the options is a condition based on a regex pattern. If it matches, the request is forwarded to a relay server; otherwise, it is blocked.
I'm thinking about whether a complex regex pattern can be used as a key for data authenticity. This regex pattern would be provided to the web server, which would then generate a string that always matches the condition.
The CF service would check the regex pattern, so the attacker couldn’t easily bypass it and hit the relay server. The request would already be blocked by the CF.
So, is it valid to use a complex regex pattern as an authentication key?
2 replies