I have an API that I would like to use with urlfetch() is there a Nightbot specific domain or IP that I can add to my CORS Origin environment variables in order to let only Nightbot access the endpoint?
3 replies
night
Nightbot's URL fetcher doesn't need CORS to work. Is there an error message you're receiving?
Frisky Moose
Right, but I don't want to add * to accepted CORS locations on my API. Does that make sense?
Gerhard
Why not? You can check the request and allow/deny the request based on for example the user-agent. Or if it's sensitive data I would add a querystring parameter with some sort of token to validate the request.