API Endpoint Security Question
I'm converting some server functions to API endpoints. With server function, I use
"use server"
to keep sensitive data like API keys secure.
Here's an example.
If I create an API endpoint to do the same thing, is my Secret Key secure without using "use server"? I think that API routes inherently run on the server, meaning the code within them is not exposed to the client. Am I right?
2 Replies
Yeah that is secure
Thank you!