json-rpc icon indicating copy to clipboard operation
json-rpc copied to clipboard

Cors Header Missing ?

Open csselo opened this issue 4 years ago • 1 comments

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

?

csselo avatar Jul 01 '20 08:07 csselo

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 avatar Jul 02 '20 11:07 pavlov99