Skip to content

superagent fails with "Origin is not allowed by Access-Control-Allow-Origin" #863

Closed
@jmound

Description

I'm unable to perform a simple GET via superagent:

var request = require('superagent');
    request
      .get('http://www.google.com/')
      .end(function(err, res){
        if (res) {
               console.log('yay got ' + err  );
             } else {
               console.log('Oh no! error ' + err );
             }
           });

yields:

2015-04-15 11:53:58.174 [tid:com.facebook.React.JavaScript] "Oh no! error Error: Origin is not allowed by Access-Control-Allow-Origin"

I've performed this making requests to a server running nginx that I control, with a variety of HTTP header permutations, and the note regarding CORS on superagent's docs here, with no success.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions