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: James Wilson <[email protected]>
parent
1730368a
Please register or sign in to comment