Answer the question
In order to leave comments, you need to log in
How to fix request blocking error?
Hello! Please help me with the following error when fetching a product from mongoDB:
Request from foreign origin blocked: (Reason: CORS header "Access-Control-Allow-Origin" is missing).
From a search on the net, I understand that you need to give access to read this request. This is done with the following line: The
Access-Control-Allow-Origin: *
question is where to register it, please tell me.
Answer the question
In order to leave comments, you need to log in
Hello! Please help me solve the problem with the following error that occurs when displaying a product from mongoDB:
MongoDB
. This is a browser limitation , you can send a request using programs such as Postman , etc. to verify this. By sending a request, you will successfully receive your response from the server. Access-Control-Allow-Origin: https://site.com
site.com
can only knock on your server. *
this symbol as a value. Access-Control-Allow-Origin: *
$webserver_name cors header
или $framework_name cors header
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question