function handleRequest(request) {// Obtain the client IP through the request.eo.clientIpconst ip = request.eo.clientIp || '';// Respond with JSON datareturn new Response(JSON.stringify({ ip }), {headers: { 'content-type': 'application/json' },});}addEventListener('fetch', event => {event.respondWith(handleRequest(event.request));});

Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback