Hello @crimsonhack,
The feature is adding a security rule in .htaccess in the following folders:
wp-content/
wp-includes/
wp-content/uploads/
Depending on the folder where the file is located, there are different filters you can use to exclude it. They are all described under the Lock and Protect System Folders section on this page.
In this particular case, the file which is blocked by our plugin is wp-content/plugins/pdfjs-viewer-shortcode/pdfjs/web/viewer.php. Here is how to whitelist it:
1. Make sure Lock and Protect System Folders feature is disabled
2. Add the following filter in the functions.php file of the active theme:
add_filter( 'sgs_whitelist_wp_content' , 'whitelist_file_in_wp_content' );
function whitelist_file_in_wp_content( $whitelist ) {
$whitelist[] = 'viewer.php';
return $whitelist;
}
3. Activate Lock and Protect System Folders feature
Reactivating the feature in SiteGround Security settings will ensure that the list of the excluded scripts will be updated.
Best regards,
Kuzman Stoyanov
Thank you very much, it works perfectly!
Maybe it would be interesting to put an option to easily create whitelists from the interface in future updates.