Http request succeeded but still prompted cross-domain

I am a rookie. I also read a lot of http materials on the Internet, but I only saw what he wrote, but I didn"t understand what he meant again.

The

problem is this: currently the cross-domain problem is solved by setting Access-Control-Allow-Origin: * at the back end (I don"t understand the back end)! The front end all requests the interface through ajax. Today, call the download file API to find the browser prompt "No "Access-Control-Allow-Origin" header is present on the requested resource.". Origin" http://localhost:9000" is therefore not allowed access". The following is a screenshot of the request:

clipboard.png

the request was successful and the data was obtained, but why is it still prompted to cross-domain? And all the other interfaces are fine, except this one.
then I compared the response headers of other interfaces. All the other interface response headers have information about Access-Control-Allow-xxxx, including Access-Control-Allow-Origin:*;, and this interface response header has nothing! If I didn"t request the successful data and didn"t get it, I probably thought the backend didn"t set up to allow me to access this domain, but right now. I don"t know what"s going on. The Book of Heaven. This is, this is as foolish as finding a farmer"s uncle in the farmland to explain to him the construction of aircraft carriers.

my understanding is that this cross-domain is still intercepted by the browser. Although your backend returns data, the browser homology policy (because there is no Access-Control-Allow-Origin:*) still considers that cross-domain, so it will not trigger the success, of ajax. Then the problem arises again. If Access-xxx is not set at the backend, I should not be able to request it. It"s even less possible to get the data, so if it"s set. Where"s Access-xxx?

I have a junior high school education. I hope my seniors can explain the whole issue in an easy-to-understand way. Thank you very much!


this is very detailed. https://developer.mozilla.org.

PS: if you change the request to post, you will definitely report an error.


I have encountered a similar phenomenon. The problem is that when you request a resource on Tencent Cloud, you can see that all the data has been fully returned in the browser network. However, the browser has thrown a cross-domain problem, and my program has been terminated because of an abnormal request. The previous practice of
was to add cross-domain permission to the backend, but the problem was solved, but this phenomenon could not be understood by itself, and it was not delved into at that time.
personally, I feel that the situation I used at that time may be related to the resource passing through cdn, but the exact relationship is not clear.


Cross-domain, jsonp doesn't know?
through train: 's understanding of cross-domain and jsonp (novice)


1. First of all, it is the behavior of the browser to judge whether to cross-domain, that is to say, even if the data is obtained, the response header is wrong, and the browser thinks that cross-domain will terminate the subsequent operation
2. Your request does not have an address, and the response of the backend to this request is missing a request header


, but you can only see what he has written and do not understand what he means. This sentence
is very interesting ~
.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e95802-1563.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e95802-1563.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?