Sorry if this is a bit of a noob question, but I have been scouring the forum for most of the day without being able to find any clear answer. I have set up a signed proxy redirect rule that calls a Netlify function on my app running at indigologic-dev.netlify.app (I’m currently working in deploy preview 28). My netlify.toml file looks like:
[[redirects]]
from = "/api/contactMail"
to = "/.netlify/functions/sendEmail"
status = 200
force = true
signed = "API_SIGNATURE_TOKEN"
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
When I review the header from the function, I can’t see an X-Nf-Sign element or any other element that appears to hold the jws. I also don’t see any cookies being passed. Here is a printout from my function log of the headers for a recent attempt (obtained via console.log(event)).
headers: {
accept: '*/*',
'accept-encoding': 'br, gzip',
'accept-language': 'en-US,en;q=0.9',
'client-ip': '100.64.0.54',
connection: 'keep-alive',
'content-length': '0',
'content-type': 'application/json',
forwarded: 'for=136.37.205.119;proto=https',
host: 'deploy-preview-28--indigologic-dev.netlify.app',
origin: 'https://deploy-preview-28--indigologic-dev.netlify.app',
referer: 'https://deploy-preview-28--indigologic-dev.netlify.app/contact',
'sec-fetch-dest': 'empty',
'sec-fetch-mode': 'cors',
'sec-fetch-site': 'same-origin',
'sec-gpc': '1',
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36',
via: 'http/1.1 Netlify[7e3845c9-c361-4dbe-9c49-0354a6899c96] (Netlify Edge Server)',
'x-bb-ab': '0.274655',
'x-bb-client-request-uuid': 'f605a57a-2a0b-4cd4-9ee9-c8cad30b36a9',
'x-bb-ip': '136.37.205.119',
'x-bb-loop': '1',
'x-cdn-domain': 'www.bitballoon.com',
'x-country': 'US',
'x-datadog-parent-id': '8358442185749973012',
'x-datadog-trace-id': '13591957236999180729',
'x-forwarded-for': '136.37.205.119, 100.64.0.54',
'x-forwarded-proto': 'https',
'x-language': 'en,en;q=0.9',
'x-nf-cache-gen': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9Cg.eyJnZW4iOiI2MGJlNjk5MDk0MTEyZjAwMDc3YWY1YWE6MTYyMzA5MTY0NTgxNiJ9Cg.KRCmUhDK7Iu8eDfE2-ILXcMQiI_4HUeFzxkHxzk6JOw',
'x-nf-client-connection-ip': '136.37.205.119',
'x-nf-connection-proto': 'https',
'x-nf-request-id': 'f605a57a-2a0b-4cd4-9ee9-c8cad30b36a9'
I’m calling the api from a button in the front-end of my application and the redirect is happening as it should, but I can’t identify where to obtain the jws in order to verify it. Can you help?
TIA!