Adding CORs?
Hey everyone, I'm working with AstroJS to create a website on Cloudflare Pages that includes an API endpoint. I want to make sure that only a specific button on my site can call this API. Is there a way to restrict access to this endpoint by using CORS? I want to set it up so that the API can only be called by this button and nowhere else. Can I do this within the endpoint's code?
0 Replies