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

Cors Header Missing ? #114

Open
csselo opened this issue Jul 1, 2020 · 1 comment
Open

Cors Header Missing ? #114

csselo opened this issue Jul 1, 2020 · 1 comment
Assignees
Labels

Comments

@csselo
Copy link

csselo commented Jul 1, 2020

rest.php:1 Access to XMLHttpRequest at 'http://localhost:4000/jsonrpc' from origin 'http://localhost' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Altough I add header

?

@pavlov99
Copy link
Owner

pavlov99 commented Jul 2, 2020

Hi @csselo

Could you please post your server code? I'm wondering why it says "rest.php", are you using php?

json-rpc is transport agnostic library, it does not deal with server interaction and hence does not have CORS handling. The latter should be implemented on your own.

@pavlov99 pavlov99 self-assigned this Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants