I am setting my https in Magento, and I hope every http:// will redirect to https:// automatically. I set the config in apache level
<VirtualHost *:80>
ServerName local.example.com
Redirect / https://local.example.com/
</VirtualHost>
It works in frontend and admin.
However, when I try to call the API with POST method http://local.example.com/index.php/rest/V1/integration/customer/token
It returns
{ "message": "Request does not match any route.", "trace": null }
If I call with https://, it returns expected result.
Anyone could help? I would like calling http:// also redirect to https:// and returns correct result.