• Niklas Adolfsson's avatar
    fix(http server): handle post and option HTTP requests properly. (#637) · 6f99a038
    Niklas Adolfsson authored
    
    
    * 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]>
    6f99a038