Unverified Commit 6f99a038 authored by Niklas Adolfsson's avatar Niklas Adolfsson Committed by GitHub
Browse files

fix(http server): handle post and option HTTP requests properly. (#637)



* fix(http server): handle post and option requests.

* Update http-server/src/response.rs

* fmt

* grumbles: validate CORS before checking method kind

* revert unintentional change

* Add A few tests around CORS and http method/header acceptance

* Tweak the CORS test

* return appropriate headers for CORS preflight response

* cargo fmt

* jsonrpc, not jsonrpsee in test requests

* don't test OPTIONS method in unsupported_methods test as it has different expectations

* Update tests/tests/integration_tests.rs

* Update tests/tests/integration_tests.rs

* Update tests/tests/integration_tests.rs

* Update tests/tests/integration_tests.rs

* Add an example to test CORS in browser, and a couple of fixes to CORS handling

* cargo fmt

* Update examples/cors_server.rs

Co-authored-by: default avatarJames Wilson <[email protected]>
parent 1730368a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment