Rob--W/cors-anywhere

Authorization error

fconsani opened this issue · 1 comments

Hello,

When trying to reach this endpoint :

https://api.kraken.com/0/public/Assets

I have this error :

{"error":[{"severity":"E","errorClass":"Auth","type":"Authorization error"}]}

Here is my server code :

var host = '0.0.0.0';
var port = 7000;

var cors_proxy = require('cors-anywhere');
cors_proxy.createServer({
removeHeaders: ['cookie', 'cookie2'],
//requireHeader: ['origin', 'x-requested-with']
//setHeaders: {'origin':'https://api.kraken.com','refer':'https://api.kraken.com', 'Authorization': 'Basic'}
}).on('request', function (req, res) {
var date = new Date();
console.log('/' + req.method + " on "+req.url +" - "+date.toLocaleString());
var ip = req.headers['x-forwarded-for'] || req.socket.remoteAddress;
console.log("FROM " + ip)
}).listen(port, host, function() {
console.log('Running CORS Anywhere on ' + host + ':' + port);
});

BR,
Franck

Rob--W commented

This response is from kraken, not my library.

Without having wasted more time at looking into the specific issue, my guess is that your client-side code didn't specify the right credentials in the request header.