Hi
i,m using Arcgisjava script on my local network and my server has not access to internet. when i load my website, I have this error in console:
Access to fetch at 'https://www.arcgis.com/sharing/rest/portals/self?f=json&culture=en ' from origin 'https://Localnetwork.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Hi Ponkerat,
May I understand how is your arcgis enterprise setup and where is your javascript is executed/deployed?
There are few possible way to overcome this issue,
Allow cors at your portal.
Restrict cross-domain requests to your portal—Portal for ArcGIS (10.7 and 10.7.1) | ArcGIS Enterprise
Access through with esri resource proxy from your javascript.
GitHub - Esri/resource-proxy: Proxy files for DotNet, Java and PHP.
Best Regards,
Than
I have arcgis server 10.5 (that have not portal) in local network and I,m using arcgisjava script 4.12 that is published in my local network too. please help...
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.