Giter Club home page Giter Club logo

corsproxy's People

Contributors

jgauffin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

corsproxy's Issues

Use in non-MVC site?

This project is very interesting, and based on all the people running into these issues, it's surprising I'm the first person to star it! I'm guessing most people running into this issue are not on IIS.

In any event, in your blog you show how to integrate it with an MVC project:

routes.EnableCorsProxy();

And there's mention of it working in other flavors of ASP.NET due to it being an IHttpHandler, yet I'm having a hard time seeing the proper way of integrating it for a regular ASP.NET site. Any pointers? Thanks!

Security issue

You should add a list of alowed host ...

If i find a website use your package, i can use this webserver to perfom attack on other website ...

in my case i only make call to a specific host ... i have edited the sourcecode to allow only my host

mvc default Route

when installing this package to mvc all default route ex RedirectToAction("Index", "Home") is generated as /corsproxy?action=Index&controller=Home

then i get a 501 error : X-CorsProxy-Url was not specified. The corsproxy should only be invoked from the proxy javascript.

Applying request headers

This is more of a question/ feature request than a bug really. We've got the requirement to have the custom request headers duplicated onto the proxied Ajax requests. Any way to do this easily in this library without modifying the source code to inject our headers directly?

data not passed correctly

Hi,

first of all thank you for creating this. You've saved my life:-).

while using this solution I found an issue preventing me from correctly using data in ajax get request. When I do something like this:

$.ajax({
    url: 'http://www.example.com/Foo/Bar?x=1&y=2',
    data: { id : 1 },
    crossDomain: true
});

url is correctly passed with X-CorsProxy-Url header, however whatever is in data is not. Content of data is attached to corsproxy url (so a call is done to an address like (...)/corsproxy?id=1 with a correct X-CorsProxy-Url header containing content of url attribute) and is not redirected further.

I've managed to fix this by simply changing your .js file from:

var url = options.url;

to:

var url = options.url + '&' + options.data;

in my scenario this will work (I'm sure that options.data is never empty and there are always other elements in query string so appending new ones with '&' is valid), but in general this might need more work (like checking whether there is a query string at all and use '?' instead of '&' and so on).

Best Regards

Is this proxy working?

Hi!
I would like to use this proxy to get rid of a server that doesn't respond with cors headers.
Is this proxy for that? if yes how it can be used?

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.