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 (17 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 2764 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.
Fixing Corrupted Documents and Upgrading Typesense Cloud Version
gab had issues with corrupted documents in Typesense Cloud. Jason suggested upgrading to version 0.24.1.rc, which resolved the issue. They also discussed CORS domain management.


Issues Deleting Collection Using Typesense with Enabled CORS
Roman encountered issues deleting collections using typesense with enabled CORS which isn't listed as a common issue in the documentation. Jason tried to provide possible solutions by asking Roman to upgrade to `0.23.0.rc47` and later suggested to open a Github issue after the problem wasn't resolved.


