How can i configura the dns i want to allow in the...
# community-help
f
How can i configura the dns i want to allow in the cors settings..
j
@Fulvio Carvalhido When you enable CORS, all domains
*
are whitelisted at the moment. Are you looking to whitelist only certain domains?
f
Im getting Access to XMLHttpRequest at ‘https://ts.domain.com/multi_search?x-typesense-api-key=xxxxxxxx’ from origin ‘https://wv21.domain.com’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
And yes i would like to limit the a few domains instead of letting all of them..
Im running the Docker version 0.21.0
j
Do you have the
--enable-cors
command line arg when starting the docker container?
And yes i would like to limit the a few domains instead of letting all of them..
We don't support narrowing down the list at the moment. Could you open a Github issue about this?
👍 1
f
Like this? /opt/typesense-server --enable-cors
1
Ok i found out..
TYPESENSE_ENABLE_CORS=true
nothing like reading the code 😄
j
Haha 🙌