Resolving CORS Issue with Typesense Cloud and Axios
TLDR Edward faced a CORS issue with Typesense Cloud and axios. After requesting help to diagnose the problem, they resolved it by configuring an individual axios instance rather than the whole axios package, mitigating a potential axios conflict. They will be adding notes to the Typesense instant search package documentation.
Apr 27, 2022 (20 months ago)
Edward
11:43 AMWe also use axios for our system and have default overrides set which we think are conflicting with the typesense axios setup. Is there a chance that our setting for 'withCredentials' = 'include' is causing this?
Kishore Nallan
12:03 PMEdward
12:05 PMI haven't got the whole error as we've moved on from here but I'll see if I can recreate it
Edward
12:14 PMWe are overriding the default axios behaviour for responses
axios.interceptors.response.use((response) => {
return response.data
})
Kishore Nallan
12:20 PMEdward
12:24 PMKishore Nallan
12:25 PMEdward
12:28 PMKishore Nallan
12:28 PMTypesense
Indexed 3015 threads (79% resolved)
Similar Threads
Resolving CORS-related Issues with Typesense Server
Edson experienced typesense-related CORS issues, which Jason solved by advising to add the `--enable-cors` flag during the startup of the typesense server. The difference in how typesense instantsearch adapter works was also clarified.
Deploying Typesense-instantsearch-adapter in Serverless Context
Emin ran into problems deploying a webpage using Typesense with CloudFlare due to axios' incompatibility with serverless contexts. Jason suggested a workaround and mentioned that axios might add a fetch-based adapter in the future. Emin agreed to implement the workaround and contribute a PR.
CORS Error When Making Search Request on Typesense Cloud
Darren is trying to use Typesense for a SaaS product but is encountering a CORS error. Jason asks for screenshot to provide further assistance.
Troubleshooting Typesense Data Load Issues on Ecommerce Platform
Dương requested help with Typesense data load issues on non-localhost systems. Kishore Nallan and David helped him isolate the problem. It was finally resolved when Dương identified and corrected a router configuration issue.
Troubleshooting CORS Enablement in Typesense Server
Pavan was unable to access Typesense server despite enabling CORS. Kishore Nallan confirmed that CORS was working fine as the required header was present.