1

We have tried approach mentioned in the IBM developers works to add the MobileFirst Web SDK. We have created Angular 5 web application and added Web SDK into it. After that, we are not able to figure out where to put MFP server IP or hostname? Currently, our web application stays in the different web server and MFP on the different.

Thanks in advance.

2 Answers2

0

You need to deploy MFP and web application in same web server else their will be a violation of same-origin policy.

Web apps that use the MobileFirst web SDK must be handled in a supporting topology. For example, use a reverse proxy to internally redirect requests to the appropriate server while maintaining the same single origin. More details about Same Origin Policy with respect to Mobilefirst App is here.

Once you have supporting topology, Register your web application in MFP Console and update the required properties in server.js file of web application.

Please follow this quick-start tutorial for Web end to end demonstration using MFP Platform.

Vittal Pai
  • 3,317
  • 25
  • 36
  • Thanks @Vittal for a quick response, But as per our architecture we need to have the web application on different web server only. We are not using the Node server. We need to deploy our web application on IIS. – MohitAgrawal Mar 22 '18 at 11:21
  • You will encounter a CORS issue. To overcome it, you can use the CORS extension on the browser or include meta headers in your web app. This has to be done as mentioned in this post : https://stackoverflow.com/questions/5750696/how-to-get-a-cross-origin-resource-sharing-cors-post-request-working – Keerthi Mar 22 '18 at 11:28
  • Please note that using the above headers mentioned could be a security vulnerability – Keerthi Mar 22 '18 at 11:38
0

You will need to define a proxy configuration or rules in your webserver , such that it should route the requests to MFP server.

Vivin K
  • 2,681
  • 1
  • 11
  • 14