Giter Site home page Giter Site logo

PrivateRoute not working about mern-auth HOT 3 OPEN

bradtraversy avatar bradtraversy commented on August 13, 2024
PrivateRoute not working

from mern-auth.

Comments (3)

yvan99 avatar yvan99 commented on August 13, 2024

can you share the codes you have in that file?

from mern-auth.

ApnaSchool0017 avatar ApnaSchool0017 commented on August 13, 2024

registration:1 Access to fetch at 'https://bipcards-backend.vercel.app/api/users' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: 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.
VM17692:6

   POST https://bipcards-backend.vercel.app/api/users net::ERR_FAILED
   
   
   
   
   i can get that error using redux toolkit

from mern-auth.

holgerflick avatar holgerflick commented on August 13, 2024

You are trying to access a different domain from your frontend. CORS will prevent you from doing that. Check the proxy configuration in vite.config.js.

from mern-auth.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.