Lambda receives an event that has these headers coming from a request sent to my API Gateway endpoint. (source: Cloudwatch log)
I wonder why there is no origin in the header but most other requests from the same API Gateway endpoint have origin set as my website.
'headers': {'Cache-Control': 'no-cache', 'Host': '***.execute-api.us-
east-2.amazonaws.com', 'X-Amzn-Trace-Id': 'Root=1-***', 'X-Forwarded-
For': '***.***.7.182', 'X-Forwarded-Port': '443', 'X-Forwarded-Proto':
'https'}
Questions:
1) Does it mean it is invoked programmatically?
2) Do some browsers not attach origin header?
3) How do I identify if this request was invoked from my website?
Edit:
I believe some of these requests are most probably requests coming from my website. However, these requests don't have origin nor referer but they do have a user agent header.
Questions:
4) Under what situation, would origin and referer not set? Is there a referer policy that I can set in my code to ask for origin and referer?
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
Thanks