I have a function on my dev site that I am trying to test. The dev site is password protected in Netlify using a basic password e.g. ‘password’
I am trying to access my function for testing, using Postman. When I submit, I get an error message about the password. No matter what I do, I can’t get it to authenticate the request.
What is the header I need to add to my Postman request, to pass in my basic password?
I have tried Authentication, Basic-Auth - password in both regular and Base64… Nothing works
I’m thinking your running into this limitation mentioned here:
Limitations
Password-protected sites. Functions triggered by events won’t work if you have full site protection enabled as Netlify doesn’t have access to site credentials or authentication information at event completion. Consider using basic authentication instead for only the sections of the site you need to protect and exclude the functions. Netlify automatically adds a layer of security for your event functions with JSON web signatures.
If you check the above code, it clearly doesn’t use basic auth. I have already shown you exactly how you need to call the call. Now, how you implement that in Postman, is up to you. But, to be explicit: