I am having trouble integrating one of our REST API. When making a POST request from composer I am geting the following error in the test
Error: TypeError: Failed to fetch. Does the server allow CORS?status: undefined Resource settings for Create record (POST) ------------------- Resource URL: https://[redacted]/sirocco/sms-voice-demo Relative path: /send
In our server, we are getting a pre-flight request (OPTIONS) like so:
OPTIONS /sirocco/sms-voice-demo/send?msisdn=124&message=124 HTTP/1.1" 200 0 "https://platform.appgyver.com/builder/applications/111721/pages/1" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36" "-"
And this is the response I am sending to the OPTIONS request
HTTP/1.1 200 OK Server: openresty Date: Thu, 23 Jul 2020 10:14:42 GMT Content-Type: application/octet-stream Content-Length: 0 Connection: keep-alive Access-Control-Allow-Origin: https://platform.appgyver.com Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE Access-Control-Max-Age: 86400
Any hint ?