spring-cloud / spring-cloud-stream-samples

Samples for Spring Cloud Stream
Apache License 2.0
956 stars 676 forks source link

POST requests don't work in the kinesis-produce-consume sample #230

Closed augustine-p closed 1 year ago

augustine-p commented 1 year ago

POST requests aren't working in the sample kinesis-produce-consume

Expected Behavior

The Controller receives the request and the producer writes the data to kinesis stream

Current Behavior

POST request aren't working and the producer isn't writing the data to the kinesis stream.

Possible Solution

Disable CSRF protection

Steps to Reproduce

  1. Start the producer and consumer
  2. To send a message:
    http://localhost:64398/
    -H 'authorization: Basic YWRtaW46MmM3Njc4OGQtZTY2MS00OWZkLWJhYmEtNGI0MWU3YzFkZDQ3'
    -H 'cache-control: no-cache'
    -H 'content-type: application/json'
    -d '{"name":"pen"}'