CodeChain-io / jsonrpc-filter

A proxy server that allows the only subsets of the RPCs
GNU Affero General Public License v3.0
4 stars 6 forks source link

Support CORS preflight #4

Closed majecty closed 5 years ago

majecty commented 5 years ago

This PR fixes #3

sgkim126 commented 5 years ago

@majecty Would you explain the commit more?

majecty commented 5 years ago

Preflight is a message sent from a browser to a server before sending a not simple message to the server. When the server received the preflight message, the server should send a success response with headers that specifies available options.

Since we support "POST, OPTIONS" methods and "application/jsonrpc" in the "Content-Type" header, I added it. You can check the "Simple request" in this page.