Created
December 1, 2023 01:10
-
-
Save bitbonsai/03f4f578b2521f7c51b1c3c05e6cb70c to your computer and use it in GitHub Desktop.
Serverless function that returns continent from Cloudfare Pages
This file contains hidden or 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
export function onRequest(context) { | |
return new Response(JSON.stringify({ | |
continent: context.request.cf.continent | |
})) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment