The check for the REST API is done on localhost. If you use Access Restrictions, adding 127.0.0.1 to the list at System > Security > Restricting Access should solve the issue.
Go to SYSTEM > SECURITY > Restricting Access > Allow access from: 127.0.0.1/32