No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Letting user choose cordova endpoint/url vs spa?

    Help
    1
    2
    104
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      devopsor last edited by

      Hi,

      I have made a SPA which works fine when served as dev or production over https, without CORS and tightly secured otherwise, where the backend is a Spring boot application.

      Now when building it for android, loading the app on the phone or emulator. What is the address the app is served from? Can I change it?

      For example, if I make a xhr/axios get-request, where to will it go by default? To localhost?

      How do I let the user, enter a url (say together on the login page) and use that for the rest of every axios or websocket connections? Save the user-entered url to LocalStorage, and load it with a boot file, just like loading the auth-keys?

      Will the app need any extra settings to allow this, like cors, or does the server need to allow all origins?

      1 Reply Last reply Reply Quote 0
      • D
        devopsor last edited by

        I solved it like so, add a “url” input to login page, then set that url to axios and when making new WebSocket(url).

        Then enabled CORS on the server to allow origin *

        1 Reply Last reply Reply Quote 0
        • First post
          Last post