An IoT device is sending data:
- by POST method
- by HTTP (not HTTPS)
- and doesn't follow redirects
I created an end-point on AWS API GateWay and I created an AWS CloudFront and configured like this:
- Origin Domain Name: myAPIgw.execute-api.us-west-1.amazonaws.com
- Origin Protocol Policy: HTTPS Only
- Viewer Protocol Policy: Redirected HTTP to HTTPS
- Allowed HTTP Methods: GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE
- Cache Policy: Managed-CachingDisabled
When I send request by Postman (auto follow redirect turned off) these are responses:
POST https://myAPIgw.execute-api.us-west-1.amazonaws.com
--> 200 Success
POST https://Mycloudfront.cloudfront.net
--> 200 Success
POST http://Mycloudfront.cloudfront.net
--> 307 Temporary Redirect
Any idea to get 200 by HTTP ?