Hi OZ,
Thanks for the super dope products! - This is more of a question than a bug report or anything...
I'm using OZ Defender Sentinels + Autotasks to shoot an http request to my backend system whenever an event is picked up on-chain. I wanted to implement some security in the backend that did "origin checks". Basically, I want my backend to only accept requests coming from whitelisted IP addresses. However, I've found it pretty difficult to find the IP address of my autotask, and I'm not sure if the IP address I did find will stay the same....
For example, here is some basic nodejs code I have within my autotask (which is of type "webhook"):
// Autotask pseudo code
exports.handler = async function (event) {
await axios.post("https://my-backend-with-origin-checks.com")
};
- How can I easily find the IP address my autotask?
- Do the autotasks have a static IP address, or do they have IP addresses that change over time?
- If the answer is that autotask IP addresses are not predictable, do you have any suggestions on how implement a kind of origin check that I am describing? I have already implemented custom auth layer using JWTs, but origin checks would have been the cherry on top
Thank you very much for your time,
Cleo.