components icon indicating copy to clipboard operation
components copied to clipboard

Basic Auth

Open afzalsayed96 opened this issue 4 years ago • 1 comments

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

afzalsayed96 avatar Apr 27 '20 17:04 afzalsayed96

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.

eahefnawy avatar Apr 29 '20 13:04 eahefnawy