• Which is weird since I am logged in to localhost:4567 in the same browser tab and have the express cookie. Is there a config issue I am not considering?

    ACP:
    Access-Control-Allow-Origin
    Access-Control-Allow-Origin Regular Expression
    Set to 127.0.0.1

    Access-Control-Allow-Credentials
    true

        var url;
          if(process.env.NODE_ENV === 'production')
            url='tbd';
          else
            url='http://localhost:4567/api/login';
        
        axios.get(url,{credentials: 'include',withCredentials: true}).then(response =>{
         console.log(response.data);
        }).catch(err =>{
          console.log(err);
        })
    

  • Some more color here as I explore more, I shifted over to the write API and /ping returns a CORS error which is strange because the /api/unread gives me an Auth error.

    Calling the API from a react app at localhost:3001 hmm


  • Okay I bit the bullet and learned nginx and am off to the races.

Suggested Topics

| |