Hello,
I have a openai app SpeakAI that is using the serpAPI library w/langchain. I want to incorporate a search agent in my app. The lang/chain library puts in a call to google search via the SerpAPI service but what is happening is serpApi does not allow CORS request so I keep getting error -
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://serpapi.com/search? ......
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://serpapi.com/search?
I read up on redirects on Netlify and setup my toml file as -
# example netlify.toml
[build]
command = "vite build"
functions = "netlify/functions"
publish = "dist"
## Uncomment to use this redirect for Single Page Applications like create-react-app.
## Not needed for static site generators.
[[redirects]]
from = "/search"
to = " https://serpapi.com"
status = 200
force = true
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
Unfortunately I still get the same CORS error. Can anybody offer any advice on what needs to be done here. Thanks in advance.