Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable CORS? #3

Open
supersonicclay opened this issue Nov 9, 2015 · 4 comments
Open

Enable CORS? #3

supersonicclay opened this issue Nov 9, 2015 · 4 comments

Comments

@supersonicclay
Copy link

First off, I love your service! Would it be possible to allow cross origin requests?

When I try and access http://artii.herokuapp.com/make?Hi from a web application, I get the following error:

XMLHttpRequest cannot load http://artii.herokuapp.com/make?Hi. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.

I'm not trying to use your API for production use, just for some web development training and tinkering.

@potomak
Copy link
Owner

potomak commented Nov 9, 2015

Yes, I think you can't make XHR requests against this API, I don't think it would be hard to support cross origin requests, but I won't be able to do it in the near future.

If you need it right now I'd suggest to create a proxy server to consume this API.

You could also add this feature by submitting a PR to speed up the process.

@supersonicclay
Copy link
Author

Sorry, I don't really have a Ruby environment or know Ruby at all. But here's a jsfiddle that reproduces the issue.

http://jsfiddle.net/oq9zg45k/

@Emaxoso
Copy link

Emaxoso commented Feb 10, 2017

Yes this could be really usefull

@EDM115
Copy link

EDM115 commented Mar 2, 2022

When I try and access http://artii.herokuapp.com/make?Hi

better using https://artii.herokuapp.com/make?text=Hi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants