FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    CORS Error when sign in

    Scheduled Pinned Locked Moved
    General Discussion
    2
    4
    1.1k
    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.
    • C
      chee
      last edited by

      Hi,

      We are developing an application using self-registration and all the FA pages for login, logout, and all the flows. I have configured the FA instance to have the custom domain in which our app is also hosted, to do something like in the documentation

      If possible, have FusionAuth and your application served by the same domain, using a proxy if needed. For example, serve your app from app.acme.com and FusionAuth from auth.acme.com.

      Then, my app domain is sdk-dev.verbum.ai while the domain for FA is auth.verbum.ai. But after login, I'm obtaining the next error

      Access to fetch at 'https://auth.verbum.ai/app/me/' from origin 'https://sdk-dev.verbum.ai' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

      In the System Settings > CORS filter I have added the domain sdk-dev.verbum.ai and the wildcard *.verbum.ai in the Allowed Origins input, but checking the event logs I can read the next,

      error log

      CORS settings

      app settings

      Can you tell me what I'm missing? I don't want to deploy a Proxy App like I'm running on my localhost.

      Best regards

      mark.robustelliM 1 Reply Last reply Reply Quote 0
      • mark.robustelliM
        mark.robustelli @chee
        last edited by

        @chee Thanks for the details. It looks like you have it mostly configured correctly. In the error message, I see: 'Host header: onemeta-dev.routing.fusionauth.io'. That seems a bit off. Where is the onemeta-dev configured?

        C 1 Reply Last reply Reply Quote 0
        • C
          chee @mark.robustelli
          last edited by

          @mark-robustelli Thanks for your reply,

          I have this deployment in the FusionAuth Cloud, then, that onemeta-dev is the domain of the FA deployment, that is onemeta-dev.fusionauth.io, and I have configured a Custom Domain for it that is auth.verbum.ai according to what I understood from the Vue Quickstart.

          Then I don't know if I'm understanding wrong and the proxy is still required between the app subdomain and the auth subdomain, for example: between sdk-dev.verbum.ai to auth.verbum.ai.

          77e7195d-3ea9-411e-accd-afa324cec31a-image.png

          Best regards!

          mark.robustelliM 1 Reply Last reply Reply Quote 0
          • mark.robustelliM
            mark.robustelli @chee
            last edited by

            @chee Who are your DNS records with? Are those configured correctly?

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