Im tryin to set up a sink route but i m gettin an content-type error on using it.
I followed https://docs.cortezaproject.org/corteza-docs/2021.3/devops-guide/extension-requirements/email-relay.html
but if i try the example under Testing Corteza
I always get an error from my curl command
echo "
From: sender@xxx.de
To: test@xxx.de
Subject: hello
Message-ID: 1234@local.machine.example
Ola Corteza!" | curl -i --data-binary @- "https://corteza.xxx.de/api/system/sink?content-type=email&expires=&method=POST&origin=postfix&__sign=SINK
content-type: application/json
content-length: 706
vary: Origin
x-request-id: c2d8c44b2b51/liVDEaVYa7-014663
strict-transport-security: max-age=31536000; includeSubDomains{“error”:{“message”:“invalid content-type header”,“meta”:{“resource”:“system:sink”,“type”:“invalidContentType”},“stack”:[{“func”:“service.sink.handleRequest”,“file”:"/drone/src/system/service/sink.go",“line”:250},{“func”:“service.(*sink).ProcessRequest.func1”,“file”:"/drone/src/system/service/sink.go",“line”:153},{“func”:“service.(*sink).ProcessRequest”,“file”:"/drone/src/system/service/sink.go",“line”:171},{“func”:“rest.(*Sink).ServeHTTP”,“file”:"/drone/src/system/rest/sink.go",“line”:20},{“func”:“chi.(*ChainHandler).ServeHTTP”,“file”:"/drone/src/vendor/github.com/go-chi/chi/chain.go",“line”:31},{“func”:“chi.(*Mux).routeHTTP”,“file”:"/drone/src/vendor/github.com/go-chi/chi/mux.go",“line”:424}]}}
i created the sink like this: docker exec 5ff3c0dce13a corteza-server sink signature --method POST --content-type email
- which works well.
But i m not gettin it sorted out how to use it. I cant get rid of the error message complaining about content-type using the curl example from the docs.
Any ideas ? Thx