Cors origin wappler

I am making a mobile application, I have created the two projects, the server and the client as the documentation says. In the client project when I perform the (server connect) to execute the action of the server project it gives me the CORS error as attached in the photograph. What do I have to do to solve the problem of COORS IN WAPPLER? In the documentation the error does not appear …!

Captura|690x370

Take a look here:

Hopefully helps to resolve the issue you are experiencing.

:slight_smile:

Hello @racsomiller

I will add that the CORS problem is solved in two ways:

  1. try using the Wappler settings:

  2. If this doesn’t help, you will have to configure the CORS policy on your hosting side.

3 Likes

But what do I put in the text field?

The * sign is:
53

This sign allows any resources to access the server action. In the future, if you want to make access more secure, you can list the addresses of all resources that can access the server. But in this case, if we are talking about mobile apps, you will have to configure a proxy so that you can redirect requests to the server via a static address. This is done because the mobile app doesn’t have a static address.

To get started, use the * sign, this will be enough. In the future, you will be able to study this topic in more detail and choose the necessary option for yourself. The main task now is to solve all the problems so that the application receives data from your server stably.

2 Likes

Thank you very much Mr Ruby.
I have done what you have told me and now it works, I can make dynamic queries in the wappler application and it no longer gives me the error, but when I run the test with the mobile the query does not work, it loads the application but does not perform the query, I don’t see the data. Why does this happen?

This is most likely either a problem with the CSP policy, or a problem with updating the "cordova-plugin-whitelist" plugin. @Dave gave you the link in the message above. Follow all the steps that are described in the topic that is located on the link. Most likely, the solution to these two problems will work and the application will start receiving data from your server stably.

1 Like