- PayloadCMS
- Strapi
- Directus
- Sanity
๐
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
| // server\api\ip.ts | |
| // Get the ip of the client on Nuxt Server | |
| export default defineEventHandler(async (event) => { | |
| const ip = getRequestIP(event, { xForwardedFor: true }); | |
| console.log(ip); | |
| return { ip: ip }; | |
| }); |