Ask teacher to instruct, how should this solve?Thank you! (ArcGIS API for JavaScript 4.9 )
We're solving this by setting up the ArcGIS Web Adaptor on the application server and using that for all the service urls in the app. Or you can just host your application on the same server as ArcGIS Enterprise. You can also read through CORS with the API | ArcGIS API for JavaScript 4.9 and https://community.esri.com/community/developers/web-developers/arcgis-api-for-javascript/blog/2018/0...