Created
September 15, 2022 20:09
-
-
Save jdecaron/d3b3e3683c81f28e77edd5404c73b3d5 to your computer and use it in GitHub Desktop.
Cloudflare Worker that returns the IP address
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addEventListener('fetch', event => { | |
return event.respondWith( | |
new Response(event.request.headers.get('CF-Connecting-IP')) | |
) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment