gabrielw
gabrielw2d ago

Http referrers in google console via convex actions

Hey all, I am currently interacting with a google api (timezone api) and am configuring the website restrictions in the google console. My system environment variable referenced within the action is logging the expected value, accessed at process.env.CONVEX_CLOUD_URL. I've followed the guidelines in the google documentation to allow subdomains of convex.cloud to call the api from the server deployments, and have also added a referer to the headers of the fetch request made from the action. I'm wondering if anyone's faced a similar issue trying to add website restrictions in the google console for requests coming from the convex cloud urls, and if these should be treated in the same manner as requests being made from a front end client
3 Replies
Convex Bot
Convex Bot2d ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
ballingt
ballingt2d ago
process.env.CONVEX_CLOUD_URL is not the URL that fetch() etc. requests are made from, it's just where your convex functions can be reached. If you need a fixed range of IPs to make HTTP requests from send us a support email and we can work it out, but if you don't need to use this restrction I wouldn't.
gabrielw
gabrielwOP2d ago
Ah super helpful! Thanks Tom! Cheers