Greetings. I am working in an offline environment (closed domain) with ArcGIS Enterprise 10.9. I am accessing the server with a web app using the JS SDK, and the mapping portion is working fine. I have enabled CORS for my origin in Organization->Settings->Security on the ArcGIS server. However, now I've needed to access the fonts served by the server in my web app to do a simple text layer, and I've changed the font url to https://myserver.domain/portal/fonts but I get a 500 error response when the SDK tries to grab the fonts and the console error says that CORS is not enabled. Is CORS for the fonts endpoint of the server enabled elsewhere? Is it possible to set no-cors mode for the font get request somehow(not preferred, but I'll take it)? Is there another solution - if you downloaded the fonts and packaged them with the app, how did you do it ? Has anyone else had to deal with this issue?
I posted this question in the ArcGIS Enterprise community since I thought that perhaps there was a setting on the server I missed (preferred option), but received no responses.
Solved! Go to Solution.
I ended up solving this by downloading the fonts I needed and hosting them in the front end static files, then setting the fonts path to that static files path.
Hi @Brice , I'm sorry you didn't get any responses over there on the Enterprise community. Networking and CORS is highly dependent on your IT infrastructure. Do you know if there is any sort of load balancer or reverse proxy in front of your server? It sounds like CORS may need to be enabled there or possibly on your server's web server. Do you happen to have any IT support in your organization? If so I'd reach out to them to see if they can assist. There is also lot's of info on how to add the CORS header to various web servers like IIS and Apache on the web. It's really not as intimidating as it sounds. The goal is to add a response header to every response
Access-Control-Allow-Origin: https://my.domain.com
https://enable-cors.org/server_iis7.html
https://enable-cors.org/server_apache.html
I ended up solving this by downloading the fonts I needed and hosting them in the front end static files, then setting the fonts path to that static files path.