The previous few days, we made a function to query within the specified range on the map. Because the transmission parameter is a polygon, the number of ur points exceeds the allowed transmission standard. After the query, ESRI has already taken this issue into consideration for you. You can directly download the Javascript proxy on the Internet as a proxy.
However, after use, it is found that although everything is correctly configured, localhost: XXX // is not allowed by access-control-allow-origin is displayed. the problem is that a lot of information is queried and cross-domain problems are found.
Many of the Google search recommendations have not been solved. Finally, in an article about cross-OriginArticleHave a good understanding of the relevant information.
Therefore, you can solve the problem by adding the following two HTTP Response Headers in Web. config or IIS:
1. Name: access-control-allow-Origin
Value :*
2. Name: access-control-allow-headers
Value: X-requested-
So I can finally access the proxy query page. Although I finally gave up this method because the IP address does not automatically switch, it solved the cross-domain problem after all. Write down to help yourself and others.