Skip to main content

Hi everyone

 

I'm trying to make a web app that will be situated on our company VPS which is off course on remote server. We are running FME Server 2019 on local machine inside our company local network and is accessed through IP address. 

For the web app, I'm using some REST API code (I'm not an expert I must say) found in your "data-distribution-with-web-maps" demo where you set fmeserver url and token. Off course, setting those two is not a problem. I have also enabled CORS on FME Server. When opening webpage, web app triggers workbench but nothing happens and web developer error appears : Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https: ...

As I have defined in JS file in web app, fmeserver url should start with http and by no means https protocol. I don't know if I'm doing something wrong. Has anyone tried anything similar and made it work?

When using this app on local network, it works (CORS disabled).

 

Thanks in advance!

Best regards

Josko

Hi @jjaksic22​ 

 

I believe this is an issue because the default setup in FME Server is to allow all hosts using the wildcard (*) however a wildcard cannot be specified if the CORS request was attempted with the credentials flag set. Instead, I think you will first need to go and add the specified client hostname to the configuration. To do this, go to the FME Server Web UI under Admin > SystemConfiguration > Networking > CORS in the FME Server Web UI and then edit the template to allow a specific host (http://docs.safe.com/fme/html/FME_Server_Documentation/Content/WebUI/CORS.htm).


Thanks @richardatsafe​. I've tried it and didn't work. I believe that it works when both web app and FME SERVER have public addresses. But our FME SERVER has local area network address that is not public and there should be introduced some VPN to access computer where FME SERVER is installed. I've talk to some network guys and they say that they're not even sure if that is possible. For now we will stick to local network web apps.


Reply