I am requesting an image in the Dojo Request and it is appending ?wab_dv=2.6 in the url and failed to query in the custom widget..
CORS Issue.. Added the new URL in the proxy.config and using Proxy.ashx.
I deployed my files in the IIS and client is running web app builder using Node.js.. so unable to access the external URL.
Thanks for the help and highly appreciated.
Cheers,
Srikanth Dasari
I am not in the client location since beginning and someone else setup the environment...
I agree with you Robert. How about set the deployVersion = “” if your widget wants to disable this feature?
Thanks,
Junshan Liu
Esri R&D Center Beijing
19th Floor, Phoenix Place Office Tower A, 5A Shuguang Xili
Chaoyang District | Beijing 100028 | China
T (86 10) 57302700
junshan_liu@esri.com<mailto:junshan_liu@esri.com> | esri.com
The Science of Where
Thriving in China, Empowering the World
发件人: Robert Scheitlin, GISP
发送时间: Tuesday, December 12, 2017 7:53 PM
收件人: Junshan Liu <junshan_liu@esri.com>
主题: Re: - Re: DojoRequest in Web app builder
GeoNet <https://community.esri.com/?et=watches.email.thread>
Re: DojoRequest in Web app builder
reply from Robert Scheitlin, GISP<https://community.esri.com/people/rscheitlin?et=watches.email.thread> in Web AppBuilder for ArcGIS - View the full discussion<https://community.esri.com/message/735630-re-dojorequest-in-web-app-builder?commentID=735630&et=watches.email.thread#comment-735630>
Hi Robert,
Thanks for the help and I suggested virtual directory in the IIS. Now the PROBLEM is client is running web app builder using apache and we deployed/created the virtual directory in IIS.
Then I am getting the error while accessing the image is
1. OPTIONS https://hoeapp133/PhotosphereImages/images/ 404 (Not Found)
2. Response for preflight has invalid HTTP status code 404
Modification not required in env.js with the deployment in the virtual directory.
Thanks & Regards,
Srikanth,
and as a security concern images are not keeping in the IIS
Can you elaborate on security concern. There is no security concern when having images in a network shared folder that is setup as a virtual directory in IIS.
If you were using a virtual directory in IIS then you would not have this issue at all. You can also add a check to the env.js appendDeployVersion function as Jushan is talking about.
for example:
if(/^http(s)?:\/\//.test(url) || /^\/proxy\.js/.test(url) || /^\/\//.test(url) || /^\\\\/.test(url)){
But I really wish there was just a way to turn this feature off as I have had to modify this function before myself to look for query in the url:
if(/^http(s)?:\/\//.test(url) || /^\/proxy\.js/.test(url) || /^\/\//.test(url) || /\/query$/.test(url)){
Which I don't think is good practice for a widget developer to have to tell their users they have to modify a core WAB file just to use their widget.
junshan_liu-esristaff
Can you modify this function appendDeployVersion in env.js?
Thank you.
I kept one more condition in env.js file to access shared path and as a security concern images are not keeping in the IIS.
Here is the url for the image which is not accessible in IE ..
Url: \\NetworkDrive\TestImages\Image1.jpg
And chrome is showing the below error.
Failed to load file://sdasari-spro/TestImages/DSCN0031.JPG: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.l @ init.js:14120:49:28.646 init.js:141 Failed to load file://sdasari-spro/TestImages: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
Please suggest me on this and would be highly appreciated.
Cheers
What does your esriRequest url look like Extactly?
The WAB env.js has some tests it does on url to determine if it appends the WAB version to the url.
Here are the conditions that it will not append the deploy version to:
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.