I am building an apex REST service to be hosted on a public site using the approach outlined here (basically hosting a REST service on a site allows you to perform actions against it without authentication, which is nice for javascript integration).
My service works perfectly in Sandbox, but when attempting to access it in prod, it always throws
<Errors>
<Error>
<errorCode>UNSUPPORTED_CLIENT</errorCode>
<message>HTTPS Required</message>
</Error>
</Errors>
This error happens even when accessing the service via HTTPs.
Here is my functional sandbox one
https://fpitesters.testbed.cs7.force.com/webServices/services/apexrest/respondentPortal/
You will get an auth token error there, that is expected. It's just a basic security measure.
And here is the production one
https://fpitesters.force.com/webServices/services/apexrest/respondentPortal/
UPDATE: So as Josh Birk pointed out, you do need to use the secure sub domain. If you try to just use HTTPs on the regular URL you do get redirected to a regular http domain. So with that in mind, the url for my service should be
https://fpitesters.secure.force.com/webServices/services/apexrest/respondentPortal/
However that URL says that the service couldn't be found.
<Errors>
<Error>
<errorCode>NOT_FOUND</errorCode>
<message>Could not find a match for URL /respondentPortal/</message>
</Error>
</Errors>
Not really sure where to go from here. Is this a bug?
Best Answer
Your production endpoint is only HTTP however. Remember that secure Force.com site has a specific domain, so I think you need:
https://fpitesters.secure.force.com/FPITestersIndex