I have our site whitelisted via the index.php file and it works however the whitelist does not work for the SOAP API access.
Is there an easy fix to add the whitelist for API access?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityin the index.php
you could add a check that searches the REQUEST_URI
for a part of the WSDL url. Something like this:
if (file_exists($maintenanceFile) && !strstr($_SERVER['REQUEST_URI'], 'api/?wsdl')) {
include_once dirname(__FILE__) . '/errors/503.php';
exit;
}
Another option would be to use the api.php
instead of the index.php
to handle API calls.
In your .htaccess
uncomment the following line to enable
# RewriteRule ^api/([a-z][0-9a-z_]+)/?$ api.php?type=$1 [QSA,L]
I was able to make this work by adding the servers internal IP address to my white list