components
components copied to clipboard
Basic Auth
Description
I'm trying to implement basic auth for a project deployed using a serverless component (serverless-next.js). The following post demonstrates how it can be done with serverless framework https://medium.com/@Da_vidgf/http-basic-auth-with-api-gateway-and-serverless-5ae14ad0a270 But I'm not sure how to set this up with serverless component syntax. Can anyone here tell me if it is even possible and how can I implement it?
Thanks
I suggest you use the express component and set the response headers as desired: https://github.com/serverless-components/express
There's no special syntax here. Just good old express.