Skip to content

Commit

Permalink
Add cloudflare worker for fully free DDNS service
Browse files Browse the repository at this point in the history
  • Loading branch information
IRus committed Jan 13, 2024
1 parent e277a4f commit 6b40558
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions cloudflare-worker/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Welcome to Cloudflare Workers! This is your first worker.
*
* - Run "npm run dev" in your terminal to start a development server
* - Open a browser tab at http://localhost:8787/ to see your worker in action
* - Run "npm run deploy" to publish your worker
*
* Learn more at https://developers.cloudflare.com/workers/
*/

export default {
fetch(request, env, ctx) {
return new Response(JSON.stringify(
{
ip: request.headers.get('cf-connecting-ip'),
},
))
}
}

0 comments on commit 6b40558

Please sign in to comment.