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 support or JSONP support for REST API #43

Closed
GoogleCodeExporter opened this issue May 4, 2015 · 5 comments
Closed

enable CORS support or JSONP support for REST API #43

GoogleCodeExporter opened this issue May 4, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. create an ajax request to the http rest api, using another server even 
locally with different port
2. initiate the requset, and you will get CORS error
3.
...

WebIOPi version used?
=>

Python version used?
=>

Distro used? (WebIOPi has only been tested on Raspbian Wheezy)
=>

Raspberry Pi board revision? (1 or 2)
=> 1

For Javascript side bugs, Browser?
=>

Please provide any additional information below.

Need to enable CORS headers on python server side, or allow jsonp return of 
data. I am attempting to communicate to the raspberry pi's GPIO via REST but 
since my nodeJs http server is running on port 80 and the webiopi is running on 
port 8000 it causes a CORS issue. JSONP wont work as data is transmitted as 
text/plain and callback is dropped.


Original issue reported on code.google.com by m.dev...@gmail.com on 30 Mar 2013 at 8:45

@GoogleCodeExporter
Copy link
Author

refused for security issue.
you should proxy requests from your front server to webiopi instead.

Original comment by tro...@trouch.com on 30 Mar 2013 at 7:24

  • Changed state: WontFix

@GoogleCodeExporter
Copy link
Author

Can you provide any documentation on how to do this?

Original comment by m.dev...@gmail.com on 1 Apr 2013 at 4:17

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

I don't know how to do it using nodejs. sorry.
for apache, you have to use proxypass directive.

Original comment by tro...@trouch.com on 1 Apr 2013 at 4:28

@GoogleCodeExporter
Copy link
Author

Issue 50 has been merged into this issue.

Original comment by tro...@trouch.com on 16 May 2013 at 9:42

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

No branches or pull requests

1 participant