Cors blocking from only one PC [closed]

I have a server running a NodeJS app and I have a website consulting data from that API. I have added the url to the allowed origins and I have no problem using the website, Evrything works fine. My only problem is that from one PC, just one so far the cors policy is blocking some requests, not all of them. But if I make the request from many other devices everything works fine.

Here is my code for the allowed origins

var allowedOrigins = ["https://www.iprocessi.com", "https://iprocessi.com", "https://cashlogic.co", "https://www.cashlogic.co", "http://localhost:3000"];

    app.use(cors({
    origin: function(origin, callback){
        // allow requests with no origin 
        // (like mobile apps or curl requests)
        if(!origin) return callback(null, true);
        if(allowedOrigins.indexOf(origin) === -1){
        var msg = 'The CORS policy for this site does not ' +
                    'allow access from the specified Origin.';
        return callback(new Error(msg), false);
        }
        return callback(null, true);
    },
    credentials: true,
    }));



Read more here: https://stackoverflow.com/questions/67005978/cors-blocking-from-only-one-pc

Content Attribution

This content was originally published by Sebastián Ardila at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: